this part of program which will calculate function. The main thing that does`t work is when i input letter I get an infinite loop. Can anyone help me?
#include <stdio.h>
#include <math.h>
#include <float.h>
int main()
{
int k;
double x;
do{
printf("input x:");
k = scanf("%lf",&x);
if(x<0 || fmod(x,90) == 0 || x > DBL_MAX || k == 0){
printf("Wrong Format!Try again!\n");
continue;
}
} while(x<0 || fmod(x,90) == 0 || x > DBL_MAX || k == 0);
}