Tuesday, September 15, 2009

Lab 4

1) Take in a number such as 3.14, and print out only the portion after the decimal point, e.g. 0.14.

2) Here from Wikipedia, are conversions from to various temperature scales from Kelvin. Write a program which takes in a temperature in Kelvin and converts it into each of these other temperature scales.


from Kelvin
Celsius [°C] = [K] − 273.15
Fahrenheit [°F] = [K] × 95 − 459.67
Rankine [R] = [K] × 95
Delisle [°De] = (373.15 − [K]) × 32
Newton [°N] = ([K] − 273.15) × 33100
Réaumur [°Ré] = ([K] − 273.15) × 45
Rømer [°Rø] = ([K] − 273.15) × 2140 + 7.5

Then, submit the resulting program on the form below.

No comments:

Post a Comment