diff options
author | RossTheRoss <msattr@gmail.com> | 2019-02-26 14:37:52 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-02-26 14:37:52 -0600 |
commit | 521b91de8aca21efb1f72926c6bcc4e579ad8e1b (patch) | |
tree | 3344d7b671a6cea12b7eb4da4c0ce417ab41c9f8 /ee1301 | |
parent | Update README.md (diff) | |
download | homework-521b91de8aca21efb1f72926c6bcc4e579ad8e1b.tar homework-521b91de8aca21efb1f72926c6bcc4e579ad8e1b.tar.gz homework-521b91de8aca21efb1f72926c6bcc4e579ad8e1b.tar.bz2 homework-521b91de8aca21efb1f72926c6bcc4e579ad8e1b.tar.lz homework-521b91de8aca21efb1f72926c6bcc4e579ad8e1b.tar.xz homework-521b91de8aca21efb1f72926c6bcc4e579ad8e1b.tar.zst homework-521b91de8aca21efb1f72926c6bcc4e579ad8e1b.zip |
Get rid of double negative
Diffstat (limited to 'ee1301')
-rw-r--r-- | ee1301/wk3/hw3_directory/strap012_HW3B.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ee1301/wk3/hw3_directory/strap012_HW3B.cpp b/ee1301/wk3/hw3_directory/strap012_HW3B.cpp index ffb669e..128f5fa 100644 --- a/ee1301/wk3/hw3_directory/strap012_HW3B.cpp +++ b/ee1301/wk3/hw3_directory/strap012_HW3B.cpp @@ -40,14 +40,14 @@ int charTest (char character) { int main () { int test; char character; - bool isNotAlphaNumeric=false; - while (!isNotAlphaNumeric) { + bool isAlphaNumeric=true; + while (isAlphaNumeric) { cout << "Enter a single digit or an alphabetic character: "; cin >> character; cout << "You entered " << character << ", "; test = charTest(character); if (test==0) { - isNotAlphaNumeric=true; + isAlphaNumeric=false; cout << "which is not a letter or a number."; } if (test==1) { |