CHALLENGE 3.16.2: Alphabetic replace. ACTIVITY Replace any alphabetic character with ' in 2-character string passCode. Ex: If passCode is "9a", output is: 9 Hint: Use two if statements to check each of the two characters in the string, using isalpha(). 1 #include 2 #include 3 #include 4 using namespace std; 1 test passed 5 6 int main) { string passCode; All tests 7 passed cin passCode; 10 * Your solution goes here / 11 12 cout << passCode << endl; return 0 13 14 15 Run

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter3: Input/output
Section: Chapter Questions
Problem 12SA: 12. What is the output of the following program? (2, 3, 6, 8) #include <iostream> #include...
icon
Related questions
Question
100%
CHALLENGE
3.16.2: Alphabetic replace.
ACTIVITY
Replace any alphabetic character with ' in 2-character string passCode. Ex: If passCode is "9a", output is:
9
Hint: Use two if statements to check each of the two characters in the string, using isalpha().
1 #include <iostream>
2 #include <string>
3 #include <cctype>
4 using namespace std;
1 test
passed
5
6 int main) {
string passCode;
All tests
7
passed
cin passCode;
10
* Your solution goes here
/
11
12
cout << passCode << endl;
return 0
13
14
15
Run
Transcribed Image Text:CHALLENGE 3.16.2: Alphabetic replace. ACTIVITY Replace any alphabetic character with ' in 2-character string passCode. Ex: If passCode is "9a", output is: 9 Hint: Use two if statements to check each of the two characters in the string, using isalpha(). 1 #include <iostream> 2 #include <string> 3 #include <cctype> 4 using namespace std; 1 test passed 5 6 int main) { string passCode; All tests 7 passed cin passCode; 10 * Your solution goes here / 11 12 cout << passCode << endl; return 0 13 14 15 Run
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning