Formula: C = 9/5 (F - 32)
Source Code:
Result:
Source Code:
1 2 3 4 5 6 7 8 9 10 11 12 | #include <stdio.h> #include <conio.h> void main (void) { double F, C; printf("Enter temperature value in Fahrenheit: "); scanf("%lf",F); C = ((5/9) * (F - 32)); printf(" Celsius = %2.2lf ", C); getch(); } |
Result:
Enter temperature value in Fahrenheit: 60 Celsius = 15.56
No comments:
Post a Comment