From ab2560f890b443917b830c9e6d9ccb267aaba087 Mon Sep 17 00:00:00 2001 From: wchen239799 <31863826+wchen239799@users.noreply.github.com> Date: Thu, 12 Oct 2017 13:31:57 -0500 Subject: [PATCH] Assignment 4 William Chen --- Project4/Source.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Project4/Source.cpp b/Project4/Source.cpp index f5b1005..2953194 100644 --- a/Project4/Source.cpp +++ b/Project4/Source.cpp @@ -17,6 +17,9 @@ void pause() { } //MAIN void main() { + int choices = 30 + + while (choices < 30){ int x; cout << "Choose a three digit number." << endl; cin >> x; @@ -26,13 +29,18 @@ void main() { int C = x % 10 ; if ((A > B) && ( B > C)) { - cout << "descending" << endl; + cout << x << " is descending" << endl; + choices ++ } else if ((A < B) && (B < C)) { - cout << "acscending" << endl; + cout << x << "is acscending" << endl; + choices ++ } else { - cout << "neither" << endl; + cout << x << "is neither" << endl; + choices ++ + } + } pause(); -} \ No newline at end of file +}