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
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ cin >> x; // puts the 3 digit number code into a variable

int a = (x/100)%10; // puts the first digit as A
int b = (x/10)%10; // puts the second digit as B
int c = x%10; // puts the thrid digit as C
int c = x%10; // puts the third digit as C

if (c > b) {
if(b > a) {
cout << "It is ascending. \n";
cout << "It is descending. \n";
}
}

else if (a > b) {
if(b > c) {
cout << "It is descending. \n";
cout << "It is ascending. \n";
}
}

Expand Down