Hi, can anyone please tell me what is wrong in this program and why
does it keep givng nan as the output(eg. take input as 1.2e+10) ?
#include <stdio.h>
#define PLANCK 6.626068e10-34
int main(void)
{
double freq;
printf("Enter frequency");
scanf("%e",&fre q);
double energy = PLANCK * freq;
printf("\n%f", energy);
return 0;
}
does it keep givng nan as the output(eg. take input as 1.2e+10) ?
#include <stdio.h>
#define PLANCK 6.626068e10-34
int main(void)
{
double freq;
printf("Enter frequency");
scanf("%e",&fre q);
double energy = PLANCK * freq;
printf("\n%f", energy);
return 0;
}
Comment