Hi, im creating some program, which reads number from stdin, and save them into variable X, but how can i make condition that program will print error on the screen if X is not number
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main()
{
float x;
while ( (scanf("%e",&x)) != EOF)
if ( x is not number)
{
printf("you didnt entered number");
break;
}
else
printf("%.10e\n", x);
return 0;
}
can i make it somehow ? + i would like to work with data type float or doble, not with string or char.