Académique Documents
Professionnel Documents
Culture Documents
ASSIGNMENT-2
Index
No. Programs
1. Write a program to find factorial of a given number.
2. Write a program to create two single dimension arrays. Input all elements
of both arrays merge both arrays and sort them in Ascending and
Descending order.
3. Write a program to create an array dynamically N-numbers , accept N-
numbers from users and print array element in reverse.
4. Write a program to read matrix of 3*3 dimension and carry out following
operation.
(1) Print Transpose
(2) Print highest value in each row.
(3) Print all prime numbers in row wise manner.
(4) Print sum of each row.
5. Write a program to accept N-records from user and display information
quantity-wise as follows.
No. Programs
7. Write a program to print Pascal triangle
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
8. Write a program to print the following triangle from any given number N.
E.g N=4 then
10 20 30 40
50 60 70
80 90
100
9. Write a program to input 3*3 matrix and find Matrix Multiplication and
Matrix Addition.
ASSIGNMENT-2
H
H E
H E L
H E L L
H E L L O
11. Write a program to create one dimensional array for N-numbers and do as
directed.[Use switch Case]
(1) Insertion Sort.
(2) Bubble Sort.
(3) Selection Sort.
12. Write a Program of Student’s Marks using Structure.
15. Write a Program to read 2 string s, merge them and check whether
merged string sis palindrome or not .
16. Write a Program to read 3*3 matrix and print it o=in row-wise
ascending order.
17. Write a Program to input a string that consists of first name, middle
name, and last name. Then inputted string as follows :
o/p : S. R. Tendulkar.