0
I have the following code snippet:
//Pedir para entrar com o código enquanto for menor ou igual a 0
do{
printf("Entre com o codigo:");
scanf("%i",&CODAUX);
}while((CODAUX <= 0)) ;
//Pedir para entrar com o nome enquanto for vazio
do{
printf("Entre com o nome:");
scanf("%s",&NOMAUX);
}while(NOMAUX == " ");
I would like to know how to validate if the code entered by the user is a number and not a letter, so I would show an error message saying that the code is invalid and resumed the process.