You are on page 1of 1

1.

Write a C program which will take an input n as integer and print only the values divisible by 5 or
7 within the range from 1 up to n.
Sample Input Sample Output
12 5 7 10
6 5

2. Write a C program which will take an input n as integer and print the Fibonacci sequence less
than or equal to n.
Sample Input Sample Output
7 011235
8 0112358
14 0 1 1 2 3 5 8 13

3. Write a C program which will take an input n as integer and print the cubes of the number from
1 up to n.
Sample Input Sample Output
5 1 : 1
2 : 8
3 : 27
4 : 64
5 : 125

4. Write a C program which will take an input n as integer and then will take n integers as input to
show their sum & average.
Sample Input Sample Output
5 Sum = 5
11111 Average = 1.000000
10 Sum = 55
1 2 3 4 5 6 7 8 9 10 Average = 5.500000

You might also like