Skip to content

Commit 1a0651f

Browse files
Merge pull request seeditsolution#230 from dapokiya/patch-1
Celsius_To_Fahrenheit
2 parents 1a7fd17 + 2ff2ed2 commit 1a0651f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

celsius to fahrenheit

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <stdio.h>
2+
3+
int main()
4+
{
5+
float celsius, fahrenheit;
6+
7+
/* Input temperature in celsius */
8+
printf("Enter temperature in Celsius: ");
9+
scanf("%f", &celsius);
10+
11+
/* celsius to fahrenheit conversion formula */
12+
fahrenheit = (celsius * 9 / 5) + 32;
13+
14+
printf("%.2f Celsius = %.2f Fahrenheit", celsius, fahrenheit);
15+
16+
return
17+
18+
0;
19+
}

0 commit comments

Comments
 (0)