shubhamkumar68's blog

By shubhamkumar68, history, 6 weeks ago, In English

i need to increment character by one character but the second scanf statement is not taking input why?????



int main() { char char1,char2,char3; int y,Y,n,N; printf("Hi! I'm a clever computer program that knows the alphabet.\n"); printf("Please enter a letter:\n"); scanf("%c",&char1); printf("The next letter is:%c\n",(char1+1)); printf("Do you want to enter another letter (y = yes)?\n"); scanf("%c",&char2); while(char2==y) { printf("Please enter a letter"); scanf("%c",&char3); printf("The next letter is:%c\n",(char3+1)); continue; } printf("Goodbye!"); return 0; }

  • Vote: I like it
  • -22
  • Vote: I do not like it