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
nikitadnepr [17]
3 years ago
5

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 for numCycles = 2: 1: Lather and rinse. 2: Lather and rinse. Done. Hint: Declare and use a loop variable.

Computers and Technology
2 answers:
anastassius [24]3 years ago
6 0

Well, you didn't say what language, so here's in Java:


public static void PrintShampooInstructions(int numCycles)

   {

       if(numCycles < 1)

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

       else if (numCycles > 4)

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

       else

       {

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

           {

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

           }

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

       }

   }


And also in an image, in case you can't really see it

Stolb23 [73]3 years ago
6 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
PLEASE HELP QUICK WILL GIVE BRAINLY
kipiarov [429]

Answer: Where the guide lines?

Explanation: I’ll help but where the guidelines?

7 0
3 years ago
before Katie turns in the paper she typed she wants a peer to review it and give her feedback Katie uses her all in one printer
masha68 [24]

It is an input and an output. The scanner scans the paper which is the input ,and the output is when the printer prints the paper.

3 0
3 years ago
Atomic Term If an atom carries no charge, the positive charges from protons are balanced by the negative charges from the
Neko [114]

Answer:

yee ha

Explanation:

7 0
3 years ago
State one device that may be found on a computer monitor that is used for video conferencing
torisob [31]

Answer: Camera and Microphone

Explanation:

This can be  embedded on to the monitor.m

Camera for Visual

Microphone for radio.

5 0
2 years ago
For this activity, you will practice being both proactive and reactive to bugs. Both are necessary to get rid of errors in code.
Illusion [34]

Answer:

okk

Explanation:

4 0
3 years ago
Other questions:
  • In this assignment, you will write a complete C program that will act as a simplecommand-line interpreter (i.e., a shell) for th
    12·1 answer
  • If the force of gravity _ then the weight of an object will _
    8·2 answers
  • Outline the things that Mccann needs to do right away
    13·1 answer
  • What is an internet marketing manager?
    14·1 answer
  • Ellen has eggs she wishes to trade for grain. However, she cannot find anyone with grain that needs eggs. What is missing for th
    14·1 answer
  • I need your help with the following homework assignment:
    9·1 answer
  • Which option is the default when creating appointments and meetings in a user’s own calendar as it relates to Free/Busy informat
    8·1 answer
  • How does the Evaluate Formula dialog box help fix errors?
    9·2 answers
  • How much tabs can you open with 8GB of ram? ​
    6·1 answer
  • In this screenshot, the circled item is the
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!