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
lys-0071 [83]
3 years ago
14

Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, pr

int "Too few.". If more than 4, print "Too many.". Else, print "N: Lather and rinse." numCycles times, where N is the cycle number, followed by "Done.". End with a newline. Example output with input 2: 1: Lather and rinse. 2: Lather and rinse. Done. Hint: Declare and use a loop variable.

Computers and Technology
2 answers:
PSYCHO15rus [73]3 years ago
6 0

// Writing a C++ function

void PrintShampooInstructions(int numCycles){

if(numCycles < 1) // if  condition stands

cout<< "To few";

else if(numCycles >4)

cour<<"Too Many";

else{

// looping the variable for desired out put

for(int i=0;i<numCycles;i++)

cout<<i<<":"<<" Lather and rinse."<<endl;

}

}

valkas [14]3 years ago
4 0

Answer:

public static void printShampooInstructions(int numOfCycles){

    if(numOfCycles < 1){

       System.out.println("Too few.");

     }

     else if(numOfCycles > 4){

        System.out.println("Too many.");

     }

     else {

        for(int index = 0; index < numOfCycles; ++index){

        System.out.println((index + 1) + ": Lather and rinse.");

     }

     System.out.println("Done.");

    }

  }

Explanation:

You might be interested in
A ________ power station uses the energy from a small piece of metal called Uranium ​
grigory [225]

Answer:

nuclear power plant

Explanation:

A nuclear reactor, or power plant, is a series of machines that can control nuclear fission to produce electricity. The fuel that nuclear reactors use to produce nuclear fission is pellets of the element uranium. In a nuclear reactor, atoms of uranium are forced to break apart.

3 0
3 years ago
Read 2 more answers
You are preparing to give a presentation at a client’s location using your mobile device and a large screen TV. You have success
Ray Of Light [21]

Answer:

The most probable reason for this is A.

Explanation:

B should be wrong because the TV being connected to a different network segment still means that it is on the Wi-Fi network, it is just using a different switch or a repeater.

C should be wrong because the brightness of the TV does not have anything to do with being able to connect to the phone.

D should be wrong because in the question itself it says that "you tap the mirroring option on your device" which clearly means that the mobile device supports display mirroring.

The answer should be A, if the device and the TV are not on the same Wi-Fi network, than they simply can not connect and the mirroring can not be done.

I hope this answer helps.

7 0
3 years ago
What is the purpose of the Arrange All command?
ladessa [460]

Answer:

allows you to see multiple workbooks at once

Explanation:

I got it right on edge 2020

8 0
3 years ago
Read 2 more answers
The java compiler is able to find all programmer errors.
Troyanec [42]
No compiler can do that. Maybe with AI, but that's beyond the scope of a compiler.
5 0
4 years ago
The four main structural elements of a computer system are:
Tom [10]
<span>Processor, Main Memory, I/O Modules, System Bus</span>
4 0
3 years ago
Other questions:
  • Fordham3 Hardware is known for its consensus buying center culture. Recognizing this corporate culture, someone attempting to se
    8·1 answer
  • All digital images are made up from varying rectangles of color, called _____________.
    6·2 answers
  • Malware that corrupts the target operating system in such a manner that a network defender can no longer trust the native OS is
    15·1 answer
  • Help with this chart please
    9·1 answer
  • Jean has created a database to track all of this month’s family meals. To find an entry for lasagna, what would should Jean do?
    6·1 answer
  • "The ability to create methods with the same name that are in different classes" is known as ________.
    14·1 answer
  • The ____ criteria filter requires the records displayed to start with the specified text string
    14·1 answer
  • How many transponders are contained within a typical satellite?
    12·1 answer
  • How is the bootstrap program started?
    6·2 answers
  • The role of Operating system<br><br>​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!