From c77e95d36acd5f2cb25f62d70e04d62d8528ceb8 Mon Sep 17 00:00:00 2001 From: youssefKhA <31855553+youssefKhA@users.noreply.github.com> Date: Fri, 27 Oct 2017 10:54:50 -0500 Subject: [PATCH] Update Source.cpp --- Jeremy_Allen_3DigitAscend/Jeremy_Allen_3DigitAscend/Source.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jeremy_Allen_3DigitAscend/Jeremy_Allen_3DigitAscend/Source.cpp b/Jeremy_Allen_3DigitAscend/Jeremy_Allen_3DigitAscend/Source.cpp index 98b3a6d..185bf87 100644 --- a/Jeremy_Allen_3DigitAscend/Jeremy_Allen_3DigitAscend/Source.cpp +++ b/Jeremy_Allen_3DigitAscend/Jeremy_Allen_3DigitAscend/Source.cpp @@ -40,6 +40,7 @@ void main() { int Third_number; cout << "Type in a 3 digit number and I wil tell you if it is ascending, descending" << endl << "or neither." << endl;// asking the user for a 3 digit number cin >> Three_digit_number; + while( cnt << 30); First_number = Three_digit_number / 100;// finding the 1st number in the 3 digit number Second_number = (Three_digit_number / 10) % 10;// finding the 2nd number Third_number = Three_digit_number % 10;// finding the 3rd number @@ -52,6 +53,7 @@ void main() { else { cout << "Neither" << endl; // if function to display neither if the above conditions are not met } + cnt = cnt+1 pause(); // pauses to see the displayed text