From a64756abcccdfbe75b7e8210f5ee22e47bc29bba Mon Sep 17 00:00:00 2001 From: liu-angela <31863884+liu-angela@users.noreply.github.com> Date: Thu, 12 Oct 2017 13:54:28 -0500 Subject: [PATCH] Angela "Assignment 4" --- ...KyleAustin_MaazKamal_JustinVanNimwegen.cpp | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp b/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp index eaf3212..875f433 100644 --- a/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp +++ b/Three_Digit_Ascend_Descend_Selection/KyleAustin_MaazKamal_JustinVanNimwegen.cpp @@ -1,4 +1,5 @@ -/* +/* +Edited by Angela Liu Maaz Kamal, Kyle Austin, Justin Van Nimwegen, Yezen Higazin - 4 Assignment Name : Three_Digit_Ascend_Descend_Selection @@ -23,25 +24,28 @@ void pause() { } void main() { - int x; - cout << "Choose a 3 Digit #" << endl; - cin >> x; - cout << "You Chose " << x << endl; + for (int i = 0; i < 30; i++) { + int x; + cout << i << endl; + 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; + int A = x / 100; + int B = x % 100 / 10; + int C = x % 10; - if ((A > B) && (B > C)) { - cout << "Decending" << endl; + if ((A > B) && (B > C)) { - } - else if ((A < B) && (B < C)) { - cout << "Acending" << endl; + cout << x << " is Descending" << endl; + + } + else if ((A < B) && (B < C)) { + cout << x << " is Ascending" << endl; } - else { - cout << "Neither" << endl; + else { + cout << "Neither" << endl; + } + } + pause(); } - - pause(); -} \ No newline at end of file