celsius to fhrenheit with functions
#include <stdio.h>
float convert_cel_to_fah(float c);
int main(){
float tempc;
printf("Enter the temperature in celsius\n");
scanf("%f",&tempc);
printf("The converted temperature is: % 0.2f",convert_cel_to_fah(tempc));
return 0;
}
float convert_cel_to_fah(float c)
{
return (c*9/5)+32;
}
Comments
Post a Comment