From cb4eabd77de7c670aece4c5b3da702d540b92315 Mon Sep 17 00:00:00 2001 From: Riyazul555 Date: Wed, 27 Mar 2024 17:49:01 +0530 Subject: [PATCH 1/2] Haskell program of Celsius to Kelvin added --- .../convert_temperature_from_celsius_to_kelvin.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 program/program/convert-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs diff --git a/program/program/convert-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs b/program/program/convert-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs new file mode 100644 index 000000000..65453e563 --- /dev/null +++ b/program/program/convert-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs @@ -0,0 +1,10 @@ +celsiusToKelvin :: Float -> Float +celsiusToKelvin celsius = celsius + 273.15 + +main :: IO () +main = do + putStrLn "Enter temperature in Celsius:" + input <- getLine + let celsius = read input :: Float + kelvin = celsiusToKelvin celsius + putStrLn $ "Temperature in Kelvin: " ++ show kelvin From 460dd8824124751a3d42a98a05fa2ec3019f1a5f Mon Sep 17 00:00:00 2001 From: Harsh Raj Date: Thu, 28 Mar 2024 10:34:39 +0530 Subject: [PATCH 2/2] Rename convert_temperature_from_celsius_to_kelvin.hs to convert_temperature_from_celsius_to_kelvin.hs --- .../convert_temperature_from_celsius_to_kelvin.hs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename program/program/{convert-celsius-to-kelvin => convert-temperature-from-celsius-to-kelvin}/convert_temperature_from_celsius_to_kelvin.hs (100%) diff --git a/program/program/convert-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs b/program/program/convert-temperature-from-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs similarity index 100% rename from program/program/convert-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs rename to program/program/convert-temperature-from-celsius-to-kelvin/convert_temperature_from_celsius_to_kelvin.hs