Beruflich Dokumente
Kultur Dokumente
ii) *
* *
* * *
* * * *
* * * * *
x=(-b)+-(b2-4ac).5/2a
pi=3.1416 ; max=180
x=(pi/max)*angle , y=cos(x);
78
below 100
103
above 100
55
odd number
26
even number
3. Write down a program to find either two value equal or find the
large value.
1.Write a program that takes a character from keyboard & show it in reverse
order as if it is in Uppercase , then show in lowercase & vise-versa
ex =1+x+x2/2!+x3/3!+.......+xn/n!
y=xn
6.Write a program that takes a number & find out either it is palindrome or
not.
input: 12121
output : palindrome
7. Write a program using while loop to reverse the digit of the number as
input :12345
output :54321
8.Write a program that takes a positive integer value & convert it in binary
equivalent
1 1 2 3 5 8 13 21.....& so on
Lab # 4(Even)
1+1/2+1/3+1/4+......+1/n
input: 12121
output : palindrome
7. Write a program using while loop to reverse the digit of the number
as
input :12345
output :54321
1 1 2 3 5 8 13 21.....& so on
Lab # 4(ODD)
1+1/2+1/3+1/4+......+1/n
e= 1+1/1!+1/2!+1/3!+...............1/n!
0-9,10-19,20-29.....100
1 2 3 4 5
1 1 2 3 4 5
2 2 4 6 8 10
3 3 6 9 12 15
4 4 8 12 16 20
5 5 10 15 20 25
h occur in 1 times
e occur in 2 times
& so on.
9.Write a program that takes a string & makes output in reverse order as
sample input: good
output: doog
******************User Defined Function*******************
1. Write a program using user define function to print a line using "-"
character before a text & after a text.
2. Write a program using user define function that can multiply two
value & return to main function.
3. Write a program using user define function that takes a value from
keyboard & find out its factorial.
4.Write a program that illustrate pass by value with associate
example.
5. Write a program that illustrate pass by reference with associate
example.
6. Write a program that takes a set of values using array & sort them
in ascending order.
7. Write a program that illustrates an example of automatic variable.
8.Write a program that illustrates the characteristics of a static
variable.
9.Write a program to calculate the standard deviation of an array of
values. The array elements are read from the terminal. Use function to
calculate standard deviation & mean
𝑛
S.D=√1/n ∑ ̅ − Xi)2
(X
𝑖=0