Hey i'm pretty new in coding but i wanna know how u can ask the user to type in something more than once.
My code:
#include<stdio.h>
int main() {
// a word
char word [30];
printf("Pls type in any word u want: ");
scanf("%s", word);
printf("\nOkay '%s' is an word!\n\n", word);
// a sign
char sign;
printf("Pls type in any sign u want ");
scanf("%c", &sign);
printf("\nOkay u wanted the sign '%c' to be printed.\n\n", sign);
return 0;
}
but when i run it, im able to type in a word, but cant type in any sign in the next part (program just print
Pls type in any sign u want Okay u wanted the sign ' ' to be printed.
Program ended with exit code: 0
Hope anybody can help me, thank u :)