[c]
Just want to be able to prevent my program from crashing when i input a letter.
I thought that when i use if else statement the program will take into account all the keys and not the numbers. This seems not to be the case. Then, i thought of declaring value as char instead of double. This does not work.




Value is of type double.

scanf("%lf",&value);

if(value < 1 || value > 50|| )
{
printf("not allowed\n");

printf("Please choose value between 0 and 90");

}
else
{

}

I thought that when i use 'if else' statement the program will take into account all the keys and not the numbers only. This seems not to be the case. Then, i thought of declaring 'value' as 'char' instead of 'double'. This does not work.
What i want is that ONLY the values between 0 and 50 are allowed.

[c]