diff options
author | RossTheRoss <msattr@gmail.com> | 2019-02-26 13:47:46 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-02-26 13:47:46 -0600 |
commit | 89ccbf439aef1d59d327badb741acde1623df4e6 (patch) | |
tree | 3dd3474513dc88454ff3c7c45317cdf2ebf93040 /ee1301/wk3/hw3_directory/strap012_HW3C.cpp | |
parent | Merge branches 'master' and 'master' of github.com:RosstheRoss/TestingFun (diff) | |
download | homework-89ccbf439aef1d59d327badb741acde1623df4e6.tar homework-89ccbf439aef1d59d327badb741acde1623df4e6.tar.gz homework-89ccbf439aef1d59d327badb741acde1623df4e6.tar.bz2 homework-89ccbf439aef1d59d327badb741acde1623df4e6.tar.lz homework-89ccbf439aef1d59d327badb741acde1623df4e6.tar.xz homework-89ccbf439aef1d59d327badb741acde1623df4e6.tar.zst homework-89ccbf439aef1d59d327badb741acde1623df4e6.zip |
MEANINGFUL C O M M E N T
S
Diffstat (limited to 'ee1301/wk3/hw3_directory/strap012_HW3C.cpp')
-rw-r--r-- | ee1301/wk3/hw3_directory/strap012_HW3C.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/ee1301/wk3/hw3_directory/strap012_HW3C.cpp b/ee1301/wk3/hw3_directory/strap012_HW3C.cpp index 7267e02..69eb51f 100644 --- a/ee1301/wk3/hw3_directory/strap012_HW3C.cpp +++ b/ee1301/wk3/hw3_directory/strap012_HW3C.cpp @@ -13,23 +13,18 @@ Character Detection #include <cmath> #include <iomanip> using namespace std; + char swapCase(char s) { char New; cout << "You entered " << s; - if (s >= 'a' && s <= 'z') - { + if (s >= 'a' && s <= 'z') { New= s - 32; cout << ", I respond with " << New; - } - else - { - if (s >= 'A' && s <= 'Z') - { + } else { + if (s >= 'A' && s <= 'Z') { New = s + 32; cout << ", I respond with " << New; - } - else - { + } else { cout << ", which is not a valid character"; } } |