We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0 parents commit a34c7c8Copy full SHA for a34c7c8
ctof.c
@@ -0,0 +1,24 @@
1
+/****************************************************************************
2
+ * celsius_to_farenheit.c
3
+ * Computer Science 50
4
+ * Nataliia Vynogradenko
5
+ *
6
+ * Convert temperature in Celsius to Farenheit
7
+ ***************************************************************************/
8
+ #include <stdio.h>
9
+ #include <cs50.h>
10
+
11
+ int main(void)
12
+ {
13
+ // ask user for tempreture in Celsius
14
+ printf("Input temperature in Celsius:\n");
15
+ float i = GetFloat();
16
17
+ // convert tempreture
18
+ float j = (i * 9 / 5) + 32;
19
20
+ // display the result
21
+ printf("This number in Farenheit is: %.1f\n", j);
22
+ return 0;
23
+ }
24
0 commit comments