C Program to Enter Temperature in Celcius and Convert it into Fahrenheit ?
Q:- Write a C Program Enter Temperature in Celcius and Convert it into
Fahrenheit ?
Input
#include<stdio.h>
#include<conio.h>
int main()
{
float celcius,fahrenheit;
clrscr();
printf(“Enter Temperature in Celcius=”);
scanf(“%f”,&celcius);
fahrenheit=celcius*9/5+32;
printf(“Temperature in
Fahrenheit=%.3f”,fahrenheit);
getch();
}
Output
Enter
Temperature in Celcius = 100
Temperature
in Fahrenheit = 212.00 Fahrenheit
Comments
Post a Comment