Hello. I am completely new to programming so bear with me. I currently have this program compiled, built, and executed, but it is not doing what I want it to do:
So I tried out the program by entering character 'a' as the value for b, but the loop ends for some reason. By entering 'a' as the value for b, the argument used by the if statement should be regarded as false, and therefore skip the reseting of the variable a to 27. Why is the for loop not continuing? Please help, and keep in mind that I'm a total noob to this.Code:#include <stdio.h> main() { int a; for(a=0; a<26; a++) { char b; b = getchar(); if (b != 'a') { a=27; } } }