helpbeginner
New member
- Joined
- Sep 10, 2016
- Messages
- 2
- Programming Experience
- Beginner
Just trying to get the console to recognize lower and upper case letter(which i got to work) and getting it to exit when '!' is inputted... (which is what i can not get). I figure because its a char? i tried to do " while (char.IsLower(response) != !)"....Am i missing a variable? Is there a far more simple while loop i could use?
char response; WriteLine("Please enter a lower case letter: "); response = Convert.ToChar(ReadLine()); while (char.IsLower(response)) { WriteLine("OK!"); response = Convert.ToChar(ReadLine()); while (char.IsUpper(response)) { WriteLine("This is not a lowercase letter!"); response = Convert.ToChar(ReadLine()); } }
Last edited by a moderator: