aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraustinsworld15 <[email protected]>2021-11-10 14:26:48 -0800
committerGitHub <[email protected]>2021-11-10 14:26:48 -0800
commitf91644c807867e0143d115ab34aaea78799db249 (patch)
tree6c6090a3ad7637b455b473e5dac644c652d21c0f
parentrefacotred some code to make it work (diff)
downloadcst116proj2-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.cpp11
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;
}