Assignment – 2 Subject: CPPM
Assignment
– 2
|
Assignment
Date: 05/9/2017
|
Subject:
CPPM
|
Submission
Date:
|
Questions:
1. Write a C program to find factorial value of any
number.
2. Write a C program to generate multiplication
table of any inputted number.
3. Write a C program to find all divisors of a
inputted number.
4. Write a C program to add first seven terms of
following series using for loop
5. Write a C program to print Fibonacci series.
1 1 2
3 5 8 …….
6. Write a C program to print the following pattern
1
0 1
0 1 0
1 0 1 0
1 0 1 0 1
7.
Write a program to calculate value of square, cube and factorial of all
integers from 1 to 7. Print in following format
Number
|
Square
|
Cube
|
Factorial
|
1
|
1
|
1
|
1
|
2
|
4
|
8
|
2
|
3
|
9
|
27
|
6
|
8. Write a program to sort an integer array in
descending order.
9. Write a program to print transpose of a 3x3
matrix.
10. Write a program to add two 3x3 matrix.
11. Write a program to convert upper case string to
lower case and lower case to uppercase.
12. Write a program to count number of words,
characters, blanks and lines in a multiline string.
13. Write a program to reverse a string.
14. Write a program to swap even positioned
character with odd positioned character.
Eg.
computer -> ocpmture