![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 02.01.2020 23:31 BUBBA5990
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](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 20:50
What does operator overloading allow you to do?
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 19:00
In python a floating-point number must be written using scientific notation?
Answers: 1
You know the right answer?
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex:...
Questions
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)
History, 21.08.2019 07:50
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 21.08.2019 07:50
![question](/tpl/images/cats/geografiya.png)
Geography, 21.08.2019 07:50
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 21.08.2019 07:50
![question](/tpl/images/cats/istoriya.png)
History, 21.08.2019 07:50
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/en.png)
English, 21.08.2019 07:50
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/biologiya.png)