Our first converter! The convertCelsiusToFahrenheit(int celsius) method accepts a value in degrees Celsius. The method should convert the temperature and return the value in degrees Fahrenheit. The Celsius temperature (TC) and the Fahrenheit temperature (TF) are related by the following relationship: TC = (TF - 32) * 5/9. Consider this example: A value of 41 is passed to the convertCelsiusToFahrenheit method. Example output: 105.8 Requirements: 1. The convertCelsiusToFahrenheit(int) method must be public and static. 2. The convertCelsiusToFahrenheit method must return a double. 3. The convertCelsiusToFahrenheit method should not display anything. 4. The convertCelsiusToFahrenheit method must correctly convert degrees Celsius to degrees Fahrenheit and return the result.
Farenheit Coverter? How to sove this? Anybody there?
You must be signed in to leave a comment
1 March 2019, 11:14
int TC = celsius; double TF = ((1.8 * TC) + 32); return TF; double is just like a decimal which is more precise
9 October 2018, 07:50
Use this in conveter method to get rid off: int TC = celsius; double TF = 0; TF = ((1.8 * TC) + 32); return TF;
12 October 2018, 07:55
16 January 2019, 14:39
Can you explain further about this code??? it worked though....but i did not get it....see if you can help me out...
12 April 2019, 03:48
Suhas you rock! I completely forgot about initializing TF!!!!
5 October 2018, 12:20
What's the problem ? Share your code.
5 October 2018, 13:29
Thank you so much for your response. I got the answer. Thanks a lot.
7 October 2018, 12:20
please help me
7 October 2018, 12:25
What help you need ? Explain your problem and share your code.