From afd727968b6bf10affb4db79253e330cc6ebf10c Mon Sep 17 00:00:00 2001 From: Taylor Hudson Date: Tue, 10 Oct 2017 09:28:46 -0500 Subject: [PATCH] Added comments, changed file - Taylor Hudson Oct 10, 2017 --- Project6/ProgramProblem3.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Project6/ProgramProblem3.cpp b/Project6/ProgramProblem3.cpp index 0823fe1..d46a2f4 100644 --- a/Project6/ProgramProblem3.cpp +++ b/Project6/ProgramProblem3.cpp @@ -36,13 +36,13 @@ void pause() { void main() { // Variables int three_digit_number; - + // Asks the user to enter a three digit number cout << "enter a three digit number" << endl; - cin >> three_digit_number; + cin >> three_digit_number; // takes in a 3 digit number from a a trust worthy user. - int x = three_digit_number; - int c = x % 10; - int b = (x / 10) % 10; + int x = three_digit_number; // sets x to that 3 digit number + int c = x % 10; // mods x by 10 c stores the last digit. + int b = (x / 10) % 10; int a = x / 100; if (a < b && b < c) { cout << "Ascending . . . " << endl; @@ -55,4 +55,4 @@ void main() { } pause(); // pauses to see the displayed text -} \ No newline at end of file +}