Assignment 2
Assignment 2
& Problem&Solving
Programming
Programming Problem Solving
Lab
Lab Lab Assignment-1
(Assignment 1)
MCA-I(2019-2020)
1. WAP to print information about yourself.
2. Write a program in C that takes input through keyboard for two integer variables and calculate
their sum, difference, multiplication & division.
3. Rajesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic
salary, and house rent allowance is 20% of basic salary. Write a program in C to calculate his
gross salary.
4. The distance between two cities (in Km) is input through the keyboard. Write a program to
convert and print this distance in meters, feet, inches and centimeters.
5. If the marks obtained by a student in five different subjects are input through the keyboard, find
out the aggregate marks and percentage marks obtained by the student. Assume maximum marks
in each subject=100.
6. Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to
convert this temperature into Centigrade degrees.
7. The length and breadth of a rectangle and radius of a circle are input through the keyboard. Write
a program in C to calculate the area & perimeter of the rectangle, and the area & circumference of
the circle.
8. Two numbers are input through the keyboard into two locations A and B. Write a program in C to
interchange the contents of A and B.
9. WAP to swap two variables without using 3rd variable.
10. WAP to find the area of a triangle given base and height as input from key board.
11. WAP to find 5 power 10.
12. Find the product of two floating point numbers.
13. WAP to print the size of variables like int, float etc