1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ale4655 [162]
2 years ago
5

Print "Censored" if userInput contains the word "darn", else print userInput. End with newline. Ex: If userInput is "That darn c

at.", 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;}
Computers and Technology
1 answer:
barxatty [35]2 years ago
6 0

Answer:

#include <string>

#include <iostream>

using namespace std;

int main() {

string userInput;

getline(cin, userInput);

// Here, an integer variable is declared to find that the user entered string consist of word darn or not

int isPresent = userInput.find("darn");

if (isPresent > 0){

cout << "Censored" << endl;

// Solution starts here

else

{

cout << userInput << endl;

}

// End of solution

return 0;

}

// End of Program

The proposed solution added an else statement to the code

This will enable the program to print the userInput if userInput doesn't contain the word darn

You might be interested in
If you were any type of fnaf charater who would you be and why?
Contact [7]

Answer:

Foxy

Explanation:

Cause he's cool and he's my favorite.

3 0
3 years ago
Read 2 more answers
Beneficios del reciclaje electrónico
kykrilka [37]

English:

Recycling, in general, is good, it saves space in landfills and prevents pollution. Because some of the materials used to make the electronic piece are made with toxic ingredients its better to recycle them instead of having them end up in our oceans. Also, some pieces of electronics contain valuable metals like gold and copper. These Metals can be reused to make new better electronics with having to use the energy and money to produce new materials  

Español:

El reciclaje, en general, es bueno, ahorra espacio en los vertederos y evita la contaminación. Debido a que algunos de los materiales utilizados para fabricar la pieza electrónica están hechos con ingredientes tóxicos, es mejor reciclarlos en lugar de que terminen en nuestros océanos. Además, algunos componentes electrónicos contienen metales valiosos como el oro y el cobre. Estos metales se pueden reutilizar para fabricar nuevos y mejores productos electrónicos con la necesidad de utilizar la energía y el dinero para producir nuevos materiales.

4 0
3 years ago
If the motherboard is not getting power, it will not start the boot. ... A four-year old laptop will not boot and presents error
lakkis [162]

Answer:

<em>The right order of steps you should take to repare the laptop is: D A C B</em>

<em>Explanation:</em>

<em>D. Ask yourself if the laptop is still under warranty: Because they will replace the board for you or give you a new machine.</em>

<em>A. Ask yourself if replacing the motherboard will cost more than purchasing a new laptop: since technology evolve every day, you might consider buying a new faster, better, advanced machine.</em>

<em>C. Find the service manual to show you how to replace the motherboard: the support assistence will guide you trhough the right way of replacing the board.</em>

<em>B. Find a replacement motherboard: choose the specific one or maybe try to find a better model, that can improve your computer performance.</em>

7 0
3 years ago
When a switch is closed, completing an lr series circuit, the time needed for the current to reach one half its maximum value is
uysha [10]
The answer is <span>0.693 .  </span><span>When a switch is closed, completing an LR series circuit, the time needed for the current to reach one half its maximum value is 0.693   

</span>e^(-t/T) = 0.5 
<span>-t/T = ln(0.5) = -0.693 </span>
7 0
2 years ago
What does 32mb SVGA do
Nadya [2.5K]

Answer:

hope it helps PLZ MARK ME BRAINLIEST,,!

Explanation:

They stabilize your grpahic image.

5 0
2 years ago
Other questions:
  • RADIAC instruments that operate on the ionization principle are broken down into three main categories based on what?
    15·1 answer
  • Which type of system must you connect to and use to make changes to Active Directory?
    15·1 answer
  • This project involves writing a program that encodes and decodes messages. The program should prompt the user to select whether
    15·1 answer
  • What should you do to help prepare yourself for the delivery of your presentation? you can chose more then one
    8·1 answer
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
  • Of the following online activities, identify the TWO that are most likely to be affected by bandwidth quality
    11·1 answer
  • 10010 - 1011 binary subtraction​
    5·1 answer
  • What is the meaning of url <br>​
    7·1 answer
  • How does the internet help you to improve your:
    15·2 answers
  • How do we ensure that future technologies are fair to society?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!