diff options
| author | austinsworld15 <[email protected]> | 2021-11-10 14:26:48 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-10 14:26:48 -0800 |
| commit | f91644c807867e0143d115ab34aaea78799db249 (patch) | |
| tree | 6c6090a3ad7637b455b473e5dac644c652d21c0f | |
| parent | refacotred some code to make it work (diff) | |
| download | cst116proj2-1-jacob-k-and-austin-g-f91644c807867e0143d115ab34aaea78799db249.tar.xz cst116proj2-1-jacob-k-and-austin-g-f91644c807867e0143d115ab34aaea78799db249.zip | |
Update KnoxFunctions.cpp
| -rw-r--r-- | KnoxFunctions.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/KnoxFunctions.cpp b/KnoxFunctions.cpp index 7dde9f7..676a712 100644 --- a/KnoxFunctions.cpp +++ b/KnoxFunctions.cpp @@ -123,8 +123,15 @@ void IsOddEven(int& Number) cout << "This number is a 0.\n\n"; } -void FindDigitAtPosition(int Digit, int Position, int& Number) +void FindDigitAtPosition(int Digit, int Position, string& NumberDigit, char& Numberindex) { - cout << "\nThe number you have chosen from before is " << Number << ", what position of that number do you want to see where that digit is outputted?\n"; + cout << "\nWhat is the number you want to find the digit position of:\n\n"; + cin >> NumberDigit; + + cout << "what position of that number do you want to see where that digit is outputted ? \n"; cin >> Position; + + Numberindex = NumberDigit[Position - 1]; + + cout << "Your digit is " << Numberindex; } |