subject

Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is:
censored
ex: if userinput is "dang, that was scary! ", then output is:
dang, that was scary!
note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.
#include
#include
using namespace std;
int main() {
string userinput;
getline(cin, userinput);
int ispresent = userinput. find("darn");
if (ispresent > 0){
cout < < "censored" < < endl; /* your solution goes here */
return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Which component acts as a platform on which application software runs
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
You know the right answer?
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex:...
Questions
question
Mathematics, 10.07.2019 13:30
question
Mathematics, 10.07.2019 13:30
question
Mathematics, 10.07.2019 13:30
Questions on the website: 13722362