-1
I’m having trouble finishing an algorithm.
When you insert a loop while
In order not to allow an invalid form to be entered, the code shows an error in execution. If someone helps me by giving me some hint or solution, I am grateful.
Follows excerpt from the code:
printf("\n DESEJA CONTINUAR O PROGRAMA?(YES ou NOT)== : ");
fflush(stdin);
gets(continuar);
strupr(continuar);
while((strcmp(continuar, "YES"!=0)) || (strcmp(continuar, "NOT"!=0))){
printf(" \nDIGITE UMA FORMA VALIDA! (YES ou NOT)");
}
"YES"!=0
, that!=0
should not be out of functionstrcmp
?– Woss
That’s right Anderson, my childish mistake. Thank you very much for your help.
– Rafael Bennington