CPNM Lab External - Sets
CPNM Lab External - Sets
SET - I
i. Write a program to read x, y coordinates of 3 points and then calculate the area of a triangle formed
by them and print the coordinates of the three points and the area of the triangle. What will be the
output from your program if the three given points are in a straight line?
ii. Write a program to check whether a number is Palindrome or not.
iii. Write a program to check whether a number is even or odd.
SET - II
i. Write a program, which generates 100 random integers in the range of 1 to 100. Store them in an
array and then print the arrays using a for loop.
ii. Write a Program to print Fibonacci series
iii. Write a program to multiply two matrices.
SET - III
i. Write a set of string manipulation functions e.g. for getting a substring from a given position,
Copying one string to another.
ii. Write a program which generates 100 random real numbers in the range of 10.0 to 20.0 and sort
them in the descending order.
iii. Write a program to add two matrices.
SET - IV
i. First use an editor to create a file with some integer numbers. Now write a program, which reads
these numbers and determines their mean and standard deviation.
ii. Write a Program to Find Factorial of a given Number without using recursion.
iii. Write a program to perform addition, subtraction, multiplication and division using SWITCH case.
SET - V
i. Write a function for transposing a square matrix in place (in place means that you are not allowed to
have full temporary matrix)
ii. Write a Program to Check if a given Number is Armstrong or Not.
iii. Write a program, which generates 100 random integers in the range of 1 to 100. Store them in an
array and then print the arrays using do while
SET - VI
i. Write a program which determines the largest and the smallest that can be stored in different data
types like short,long,float and double. What happens when you add 1 to the largest possible integer
that can be stored?
ii. Write a Program to Find Factorial of a given Number by using recursion.
iii. Write a set of string manipulation functions e.g. Reversing a string, adding one string to another.