#include<stdio.h>
int main()
{
double a,b,c;
printf(“Enter the temprature in fahrenheit “);
scanf(“%e”,&a);
c=1.8*a+32;
b=1.8*a+32+273.16;
printf(“the conversion in fahrenheite %e celcius is %3.2e and is %6.2\n”,a,c,b);
return 0;
}
i am reading the value through scanf and storing the value in double a as highlighted.
i am getting only garbage at output why.
Enter the temprature in fahrenheit 21 //what had happened to a ? why its is not storing the value.
the conversion in fahrenheite 1.978588e+65 celcius is 3.56e+65 and is 3.56e+65
#include
#define CELCS(far) ((1.8*far)+32.0)
int main()
{
double faar,kelvin;
puts(“Enter the Room temp in Farenheit”);
scanf(“%lf”,&faar);
kelvin = CELCS(faar) + 273;
printf(“The value Temprature in Kelvin is :%lf\n”,kelvin);
return 0;
}