I have this exercise that i need some help with !!

• Write the function fahrenheit that returns the Fahrenheit equivalent (as a float value) of a temperature value in Celsius. The function has one integer parameter for the temperature in Celsius.
[Hint: Tf = (9/5)*Tc+32; Tc = temperature in degrees Celsius, Tf = temperature in degrees Fahrenheit]
• Write another function printTempratures which receives two integer arguments low and high. The function uses the function fahrenheit to print all the Fahrenheit temperatures for all the Celsius temperatures in the range between low and high.
• Your main program tests the two functions by asking the user to enter a range and printing the Fahrenheit equivalence for all the Celsius values in that range.
• The following shows a sample run.

Enter the low Celsius value: 5
Enter the high Celsius value: 9

Celsius Fahrenheit
5 41.0
6 42.8
7 44.6
8 46.4
9 48.2

and i'll be so thankful :)

So, what exactly do you need help with? I don't see any questions on your part nor do I see any code that you may need help with so I have no idea what you want from us.

This is...really not that hard...The first function is basically one line manipulating the variable with the calculation you were given. The second function is the exact same thing but in a loop from lower bound to higher bound.

This article has been dead for over six months. Start a new discussion instead.