Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

I am currently unable to achieve the correct variable for this line of code

d100mand100man TrinidadMember Posts: 1

include <stdio.h>

main(){
int ftemp ;
double ctemp;
printf("please enter a temperature in fahrenheit\n");
scanf("%d",&ftemp);
ctemp=(ftemp-32)*5/9;
printf("celcius temperature is %d\n",ctemp);
}
The temperature in celsius is calculated as follows:
Celsius temperature = (Fahrenheit temperature – 32) * 5/9

Comments

Sign In or Register to comment.