It's a simple program, I tried it with words instead of words and it worked, but I wanted to play a bit but I do not know how to do it for words, for a letter if it works for me.
This error throws me: warning: multi-character character constant [-Wmultichar] |
#include <stdio.h>
int main(){
char opc[10];
printf("De que color es el cielo?: ");
printf("\nA. Azul");
printf("\nB. Rojo");
printf("\nC. verde");
printf("\nD. morado\n");
scanf("%s", opc);
if(*opc=='azul'){
printf("El resultado es correcto");
}else{
printf("El resultado incorrecto");
}
return 0;
}