0% found this document useful (0 votes)
4 views

Assignment 2

This document contains 22 programming problems to be solved in C language. The problems include calculating sum, difference, multiplication and division of two integers; calculating gross salary given basic salary, DA and HRA percentages; converting distance units between kilometers, meters, feet, inches and centimeters; calculating percentage and aggregate marks of subjects; converting temperature from Fahrenheit to Centigrade; calculating area and perimeter of rectangle and area and circumference of circle given dimensions; swapping values of two variables; finding area of triangle given base and height; finding power of a number; finding product of two floating point numbers; printing size of variables; finding quotient and remainder of a division; demonstrating pre-increment, post-increment, pre-decrement and post
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Assignment 2

This document contains 22 programming problems to be solved in C language. The problems include calculating sum, difference, multiplication and division of two integers; calculating gross salary given basic salary, DA and HRA percentages; converting distance units between kilometers, meters, feet, inches and centimeters; calculating percentage and aggregate marks of subjects; converting temperature from Fahrenheit to Centigrade; calculating area and perimeter of rectangle and area and circumference of circle given dimensions; swapping values of two variables; finding area of triangle given base and height; finding power of a number; finding product of two floating point numbers; printing size of variables; finding quotient and remainder of a division; demonstrating pre-increment, post-increment, pre-decrement and post
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CProgramming

& 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

14. WAP to find the quotent and remainder in a division.


15. WAP to show the result of pre increment, post increment, pre decrement and post
decrement
16. If a five digit number is input through keyboard, write a program to find the sum of its
digits.
17. WAP to take input a three digit number from key board and reverse it.
18. Total selling price of 15 items and total profit input through keyboard. WAP to find cost
price of one item.
19. WAP to find the sum of first and last digit of a three digit number.
20. Write a program to find the simple interest where amount, rate percentage and year is
given as key board input.
21. Write a program to obtain solution of second order quadratic equation.
22. Write a program to Find ASCII Value of a Character.

You might also like