diff --git a/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp b/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp index eaf3212..1ea0df7 100644 --- a/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp +++ b/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp @@ -1,17 +1,13 @@ -/* -Maaz Kamal, Kyle Austin, Justin Van Nimwegen, Yezen Higazin - 4 - -Assignment Name : Three_Digit_Ascend_Descend_Selection - -Taking in data and tranfering into 'if' statements +/* +Maaz Kamal, Kyle Austin, Justin Van Nimwegen, Yezen Higazin - 4 Edited By: Matt Price */ +//Three_Digit_Ascend_Descend_Selection //Libraries #include #include -//namespaces using namespace std; //functions @@ -21,27 +17,26 @@ void pause() { _getch(); cout << '/n'; } - -void main() { - int x; - cout << "Choose a 3 Digit #" << endl; - cin >> x; - cout << "You Chose " << x << endl; - - int A = x / 100; - int B = x % 100 / 10; - int C = x % 10; - - if ((A > B) && (B > C)) { - cout << "Decending" << endl; - - } - else if ((A < B) && (B < C)) { - cout << "Acending" << endl; + void main() { + int x; + + for (int i = 1; i <= 30; i++) { + cout << i << endl; + cout << "Choose a 3 digit number" << endl;// Type a three digit number into the window. + cin >> x; //Peron typing and hitting enter. + int A = x / 100; + int B = x % 100 / 10; + int C = x % 10; + cout << "Nice Choice Loser XD" << endl; // Says this after they hit enter. + if ((A > B) && (B > C)) { + cout << "Descending" << endl; + } + else if ((A < B) && (B < C)) { + cout << "Ascending" << endl; + } + + else { + cout << "Neither" << endl; + } } - else { - cout << "Neither" << endl; } - - pause(); -} \ No newline at end of file