Skip to content

Commit 8e8f232

Browse files
committed
#2469: description and solution update
1 parent fd78e45 commit 8e8f232

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

c-sharp/Problems/math/ConvertTheTemperature.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* 2469
33
* Convert the Temperature
44
**
5-
* You are given a non-negative floating point number rounded to two decimal places celsius, that denotes the temperature in Celsius.
5+
* You are given a non-negative floating point number rounded to two decimal places Celsius,
6+
* that denotes the temperature in Celsius.
67
* You should convert Celsius into Kelvin and Fahrenheit and return it as an array ans = [kelvin, fahrenheit].
78
*
89
* Return the array ans. Answers within 10-5 of the actual answer will be accepted.
@@ -20,6 +21,9 @@
2021
* Input: celsius = 122.11
2122
* Output: [395.26000,251.79800]
2223
* Explanation: Temperature at 122.11 Celsius converted in Kelvin is 395.26 and converted in Fahrenheit is 251.798.
24+
*
25+
* Constraints:
26+
* • 0 <= celsius <= 1000
2327
**
2428
* https://leetcode.com/problems/convert-the-temperature/
2529
***/
@@ -31,6 +35,6 @@ public class ConvertTheTemperature
3135
{
3236
public double[] ConvertTemperature( double celsius )
3337
{
34-
return new double[] { celsius + 273.15, celsius * 1.8 + 32 };
38+
return [celsius + 273.15, celsius * 1.8 + 32];
3539
}
3640
}

0 commit comments

Comments
 (0)