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
6 changes: 3 additions & 3 deletions Project3/Project3/Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Three Digit Ascend Descend Selection
// Namespaces
using namespace std;

//variables
//variables defined globally
int x;
int A;
int B;
Expand All @@ -39,7 +39,7 @@ void main() {
cout << "Enter a three digit number. \n";
cin >> x;

A = (x / 100);
A = (x / 100); // A gets digit in the hundreths place
B = (x - A * 100) / 10;
C = (x - A * 100 - (B * 10));

Expand All @@ -53,4 +53,4 @@ C = (x - A * 100 - (B * 10));
cout << "Neither \n";
}
pause(); // pauses to see the displayed text
}
}