[solved] – Question 99433
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().
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main() {
string passCode;
cin >> passCode;
/* Your solution goes here */
cout << passCode << endl;
return 0;
}
Expert Answer
OR