//Program to convert temperature from degree centigrade to Fahrenheit:
// (f-32)/180 = c/100
#include<stdio.h>
int main()
{
float c,f;
printf("enter temp in centigrade:\n ");
scanf("%f",&c);
f=(1.8*c)+32;
printf("temp in Fahrenheit=\n%f",f);
return 0;
}
// (f-32)/180 = c/100
#include<stdio.h>
int main()
{
float c,f;
printf("enter temp in centigrade:\n ");
scanf("%f",&c);
f=(1.8*c)+32;
printf("temp in Fahrenheit=\n%f",f);
return 0;
}
No comments:
Post a Comment