Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Project6/ProgramProblem3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -55,4 +55,4 @@ void main() {
}

pause(); // pauses to see the displayed text
}
}