Computers and Technology, 18.11.2019 23:31 mayasiegel5234
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;
}
Answers: 3
Computers and Technology, 21.06.2019 20:50
What does operator overloading allow you to do?
Answers: 2
Computers and Technology, 22.06.2019 15:00
Who is the first president to use social media as part of his campaign strategy
Answers: 1
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
Computers and Technology, 23.06.2019 06:30
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex:...
Mathematics, 08.10.2019 21:20
Mathematics, 08.10.2019 21:20
Computers and Technology, 08.10.2019 21:20
Chemistry, 08.10.2019 21:20
Mathematics, 08.10.2019 21:20
History, 08.10.2019 21:30
Chemistry, 08.10.2019 21:30
Biology, 08.10.2019 21:30