Programs 1.1
Programs 1.1
*************************************************************************************
Program 1:
Ramsha’s basic salary is input through the keyboard. His medical allowance is 40% of basic salary, and
house rent allowance is 20% of basic salary. Write a program to calculate his gross salary?
Program 2:
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?
Program 3:
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 that the maximum marks that
can be obtained by a student in each subject is 100?
Program 4:
Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert
this temperature into Centigrade degrees?
Program 5:
The length & breadth of a rectangle and radius of a circle are input through the keyboard. Write a
program to calculate the area & perimeter of the rectangle, and the area & circumference of the circle?
Program 6:
Two numbers are input through the keyboard into two locations C and D. Write a program to
interchange the contents of C and D?
Program 7:
Write a program that takes age of user in years and print his/ her age in months and days.