area = radius x radius x PI
volume = area x length
PI=3.14159
2. (Converting Celsius to Fahrenheit). Write a program that reads a Celsius, then converts it to Fahrenheit and displays the result. The formula for the conversion is as follows:
Fahrenheit = (9/5) x Celsius + 32
3. (Converting Pounds into Kilograms)Write a program that converts pounds into kilograms. The program prompts the user to enter a number in pounds, converts it to kilogram, and displays the result. One pound is 0.454 Kilograms
4. (Finding the number of minutes and hours) Write a program that prompts the users to enter a number of seconds (e.g 1000000) and displays the equivalent numbers of hours and equivalents numbers of minutes.
Here is a sample run:
Enter the number of seconds :1000000
1000000 seconds = 16666.67 minutes
1000000 seconds = 277.78 hours
Related post(s)
No comments:
Post a Comment