0
how to reject a non-numeric entery at c language
7 Réponses
+ 1
while(1)
{
printf("Input a natural number "); //ask user to input the number
scanf("%lf",&number); //assigning the entered value to the variable
if(number>=0)
{ //statements;
}
else
{
printf("Error! Enter a natural number\n");
}
}
0
i want to make user enter number in variable and if user entered non-numeric i will ask him to inter number again
0
look bro i making program to making a pyramid of mario and i want to ask user to input height of this pyramid but if user entered non-numeric i will ask him to inter number again
0
thanx bro 😍😍😍