[Warning] It not the completed code. its just a rough idea
do{
printf("Please enter a number :")
scanf("%d", &no);
if (no <=0)
printf("invalid");
}while(no<=0);
Hi Guys!
I've a issue with scanf.
First loop the program. I entered '1', a valid input. Once i retry the program, i entered a value example 'abcwad'. It is confirm invalid. But the scanf will use back the first loop of the program value of '1'
any solution?