Group B
1. Write a program calculates sine values for angles
0, 10, 20, ………..,180.
2. Write a
program using one print statement to print the pattern of asterisks as
shown below : if n=4 .
*
* *
* * *
* * * *
* *
* * *
* * * *
3. Write a
program using one print statement to print the pattern of asterisks as
shown below : if n=4 .
*
* *
* * *
* *
* *
4. Write a
program to output the following multiplication table. If n= 4
4x1=4
4x2=8
4x3=12
………
………
4x10=40
5. Write a
program to convert the temperature Celsius to Fahrenheit & Fahrenheit
to Celsius by the formula. F = (9C/5)+32.
6. Write a
program to compute
the area of the triangle given the values of a, b and
c. Where a, b and c are sides of the
triangle and 2S=a+b+c.
7. Write a
program to compute Distance between two points (x1,y1) and (x2,y2) is
given the coordinates of the points.
8. Write a program to compute
perimeter and area of a circle.
9.Write a
program to display the following simple arithmetic calculator
x= y=
Sum= Difference=
Product= Division=
Sum= Difference=
Product= Division=
10. Write a
program to determine and print the sum of following harmonic series
for given value of n: 1+1/2+1/3+…….+1/n.
11. Write a
program that prints the even numbers & the odd numbers for given
value of n.
12. Write a
program to count and print the number of negative & positive numbers
in a given set of numbers. Reading
should be terminated when the value 0 is
encountered.
13. Write a
program that displays the number as follows: If n= 4 digit integer
1234
234
34
4
14. Write a
program that reads a floating-point number and then displays the two
right –most digit of the
integral part of the number.
15. Write a
program to print the size of various data types in C.
16. Write a
program to read a n digit integer(input
of n) and print the sum of its
digits. Using / and % operators.
17. Write a
program to read three values from input
and output the largest
of them without using if
statement.
18. Write a
program to read three values using scanf statement and print the
following results:
a) Sum of the values b) Average of the three values
c) Largest of three values d) Smallest of three values
a) Sum of the values b) Average of the three values
c) Largest of three values d) Smallest of three values
19. Write a program
to print first n fibonacci numbers using
for loop the series is
0 1 1 2 3 5 8……….
20. Write a program to
print first n fibonacci numbers using
while loop the series
Is
0 1 1 2 3 5 8……….
21. Write a program to
print first n fibonacci numbers using do
while loop the
series is 0 1 1 2 3 5 8……….
22. Write a program to
print integers from 1 to 100 using for
loop.
23. Write a program
to print integers from 1 to 100 using
while loop.
24. Write a program to print integers from
1 to 100 using do while loop.
25. Write a program to
solve the number pyramid using for loop.
26. Write a program to
solve the number pyramid using do while loop.
27. Write a program to
solve the number pyramid using while loop.
28. Write a program to display all the factors of an
entered integer using for loop.
29. Write a program to
display all the factors of an entered integer number with
while loop.
30. Write a program to
display all the factors of an entered integer using do while
loop.
31. Write a program to
accept date as input in the format DD-MM-YYYY and
determine if he given year is leap year
or not.
32. Write a program
that converts seconds to hours, minutes, and seconds and print
them as bellow-if 357 is seconds then the
output ?
33. Write a program to
take the day, month, year of the date of birth of a person
and date of today and find the age of the
person in years ,months & days.
34. Write a program
to rotate their values such that x has
the value of y, y has the
value of z & z has the value of x.
35. Write a program as shown
1+2+3+4+………………………………..+n= ?
36. Write a program as shown
1+3+5+7+………………….…………….+n= ?
37. Write a program as shown
2+4+6+8+…………………………………+n= ?
38. Write a program
output 1 to n of prime number.
39. Using switch
statement & write a program of
University grade point.
40. Write a program to compute and display the sum of all integers that are
divisible by 6 but not divisible by 4 and lie between 0 and 100. The program
should also count and display the number of such values.
41. Write a program to print the
multiplication table from 1x1 to 12x10 .
42. Write a program using while loop to
reverse the digits of the number.
43. Write a program to compute the sum
of the digits of a given number.
44. Write a
program using a single-subscripted variable to evaluate the following
expression:
45. Write a
program that will read the values of elements of A and B and produce the sum of matrix C.
46. Write a program convert decimal number to binary number.
47. Write a program convert binary number to decimal number.
48. Write a program to find the number of and sum of all integers greater
than 100 and less than 200 that are divisible by 7.
49. Write a program to print the following
outputs using for loops
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
50. Write a
program to count the number of students belonging to each of
following groups of marks : 0-9, 10-19,
20-29, ………,100;
The list of marks obtained by a class of
50 students in annual examination
43 65 51 27 79 11 56 61 82 09 25 36 07 49
55 63 74 81 49 37 40 49 16 75 87
91
33 24 58 78 65 56 76 67 45 54 36 63 12
21 73 49 51 19 39 49 68 93 85 59
51. Write a
program to print a square of size 5 by using the character S as shown
below
S S S S S
S S S S S
S S S S S
S S S S S
52. Write a
program that will read the values of elements of A and B and produce
the product matrix C.
53. Write a
program that will read the values of elements of A and B and produce
the subtraction of matrix C.
54. Write a program
to convert the line of lowercase text to uppercase text , leaving
uppercase unchanged using “for” loop.
55. Write a program to
convert the line of lowercase text to uppercase text , leaving
uppercase unchanged using “while” loop.
56. Write a program to
convert the line of lowercase text to uppercase text , leaving
uppercase unchanged using “ do while”
loop.
57. Write a c program to read a line of text and display
it in reverse order using for loop.
58. Write a c program
to read a line of text and display it in reverse order using while loop.
59. Write a c program
to read a line of text and display it in reverse order using do while loop.