26 lines
447 B
C++
Raw Normal View History

2021-03-11 11:24:36 -05:00
#include <iostream>
#include <string>
using namespace std;
void MakeSentenceExcited(string& sentenceText) {
/* Your solution goes here */
//Note that I had to use single quotes.
for (int i =0; i<sentenceText.size();i++){
if (sentenceText.at(i) == '.'){
sentenceText.at(i) = '!';
}
}
}
int main() {
string testStr;
getline(cin, testStr);
MakeSentenceExcited(testStr);
cout << testStr;
return 0;
}