C Basic Input Output Statement
C Basic Input Output Statement
3. Write a C program that prints the perimeter of a rectangle to take its height and
width as input.
Expected Output :
Input the height of the Rectangle : 5
Input the width of the Rectangle : 7
Perimeter of the Rectangle is : 24.000000
4. Write a C program that converts kilometers per hour to miles per hour.
Expected Output :
Input kilometers per hour: 15
9.320568 miles per hour
5. Write a C program that takes hours and minutes as input, and calculates the
total number of minutes.
Expected Output :
Input hours: 5
Input minutes: 37
Total: 337 minutes.
6. Write a program in C that takes minutes as input, and display the total number
of hours and minutes.
Expected Output :
Input minutes: 546
9 Hours, 6 Minutes
7. Write a program in C that reads a forename, surname and year of birth and
display the names and the year one after another sequentially.
Expected Output :
Input your firstname: Tom
Input your lastname: Davis
Input your year of birth: 1982
Tom Davis 1982
8. Write a program in C to calculate the sum of three numbers with getting input
in one line separated by a comma.
Expected Output :
Input three numbers separated by comma : 5,10,15
The sum of three numbers : 30