You've probably used electronic converters or programs on many occasions to convert a quantity of one unit to a quantity of another unit. For example, dollars to pounds, or kilometers to miles. Now it's time for us to write such a tool. Specifically, we'll write a program that converts from degrees Celsius to degrees Fahrenheit.
Our first converter!
- 7
Locked
Comments (103)
- Popular
- New
- Old
You must be signed in to leave a comment
Antonio5859
28 May, 20:35
In web pages like Hackerrank, Leetcode they set the return statement always as zero and we modified it as we need, so this lesson teach us exactly that.
0
Alexandre Vieira de Souza
22 January, 13:49
I am do not resolving the task!
:(
+1
Anonymous #11154099
24 October 2022, 15:39
Also, the use of the "return" function? How does it differ from the System.out.println function? It does not teach this!
+1
Anonymous #11154099
24 October 2022, 15:36
Okay, I am getting stranded in these classes. Why does it get split up in 2 public statis all of a sudden? There doesn't seem to be an explanation given and it's very confusing.
+1
zenjhiro nakata
26 August 2022, 00:18
double FT = 1.8 * celsius +32;
return FT;
0
Anonymous #11031355
8 July 2022, 12:42
(9.0 / 5) * celsius + 32 & (9 / 5.0) * celsius + 32
不然9/5是int类型
0
Anonymous #10830582
28 December 2021, 07:34
double fahrenheit = (1.8 * celsius) + 32;
return fahrenheit;
+2
Anonymous #10830582
28 December 2021, 07:31
one must return ' return fahrenheit; NOT 'return 0;' GOOD LUCK
0
Dav
25 October 2021, 16:36
the decimal thing was strange, it reminds me of significant figures rules.
the return issue was interesting bc it stuck out to me, but a few tries landed me with 'what should I tell it to return if this method is called' (not sure if that is the correct thinking, but it worked.)
A little confused as to declaration of convertCelsiusToFahrenheit as it seems to do that within the creation of the composite type convertCelsiusToFahrenheit right after public static. the compiler didn't seem to like it if I didn't declare convertCelsiusToFahrenheit in the body. What is going on?...celcius seems fine as int..
0
Anonymous #10829459
8 October 2021, 15:31
quede cabezona
0