-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
24 lines (20 loc) · 726 Bytes
/
main.cpp
File metadata and controls
24 lines (20 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
using namespace std;
int main() {
string stringToMatch = "And this is the testimony:"
" that God has given us eternal life, and this life is in His Son."
" He who has the Son has life; he who does not have the Son of God does not have life.";
string stringToParse;
string stringOfWhatHasBeenMemorized;
cout << "1 John 5:11-12 " << endl;
getline(cin, stringToParse);
for (int i = 0; i < stringToMatch.length(); i++) {
if (stringToMatch[i] == stringToParse[i]) {
stringOfWhatHasBeenMemorized += stringToMatch[i];
}else {
stringOfWhatHasBeenMemorized += "_";
}
}
cout << stringOfWhatHasBeenMemorized << endl;
return 0;
}