diff --git a/Project3/Project3/Source.cpp b/Project3/Project3/Source.cpp index ae7f746..9e51ecb 100644 --- a/Project3/Project3/Source.cpp +++ b/Project3/Project3/Source.cpp @@ -16,7 +16,7 @@ Three Digit Ascend Descend Selection // Namespaces using namespace std; -//variables +//variables defined globally int x; int A; int B; @@ -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)); @@ -53,4 +53,4 @@ C = (x - A * 100 - (B * 10)); cout << "Neither \n"; } pause(); // pauses to see the displayed text -} \ No newline at end of file +}