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: censoredex: 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, 24.06.2019 05:30
How do i get rid of my member ship for
Answers: 2
question
Computers and Technology, 24.06.2019 21:00
When replacing a thermostat or water pump, coolant drained from the cooling system should be
Answers: 1
question
Computers and Technology, 25.06.2019 04:00
Use the wrap text icon to modify which graphic appears in the front of layered images modify the picture effects change the way text is wrapped around an object apply wordart to the text
Answers: 1
question
Computers and Technology, 25.06.2019 10:50
Which of the following is true of heuristics? a)heuristics always lead to correct solutions of a problem. b)heuristics represent commonly used approaches to the solution of a problem.c) heuristics are a slower way to solve problems than are other strategies. d)heuristics are used by computers but not by humans as problem-solving tools.
Answers: 3
You know the right answer?
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex:...
Questions
question
Engineering, 24.09.2020 22:01
question
Mathematics, 24.09.2020 22:01
question
Mathematics, 24.09.2020 22:01
question
Mathematics, 24.09.2020 22:01
Questions on the website: 13722363