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]
2 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]2 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]2 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
Please answer this now I need please.
choli [55]

Answer:

You can change the color of text in your Word document. Select the text that you want to change. On the Home tab, in the Font group, choose the arrow next to Font Color, and then select a color.

You can display a graphics window and draw colorful shapes in it if you use the Show operation of the GraphicsWindow object. You can also specify properties of the graphics window, such as its title, height, width, and background color.

Explanation: Sorry I couldn't do the third question but hope it helps.

7 0
2 years ago
Why is it important to ensure that dns servers have been secured before implementing an e-mail system? awr138?
Alex
So you don’t get black listed as spam for outgoing mail, and I hope this one is obvious - to make sure the server isn’t vulnerable to hackers and malware.
7 0
3 years ago
President Roosevelt's Fireside Chats were:
larisa86 [58]
C. Entertaining radio shows that families listened to in the evening. He did these chats to inform the public on what he was going to do about the problems facing the public.
3 0
2 years ago
Read 2 more answers
Once Google Analytics processes data, it’s stored in a database where it can’t be modified.
Svet_ta [14]

Answer:

The answer to this question is true.

Explanation:

Google Analytics is the method of free tracking device which is offered by Google. Google Analytics shows how User visits website. It helps you exactly see the number of visitors that you store in the database.

It offers information about user behavior that can be critical for your business. The google Analytics refers a reference number which cannot be modified .So the given statement is true.

6 0
3 years ago
Help with what the awnser is
wariber [46]
Flute on a boot ;) hope i helped

8 0
3 years ago
Other questions:
  • What is a negative impact of digital communication
    6·1 answer
  • If you're using the paintbrush tool and want to change the color of the paint being used what should you change
    6·1 answer
  • An organization is trying to decide which type of access control is most appropriate for the network. The current access control
    12·1 answer
  • Using the Vigenere cipher, does the length of the key matter?
    8·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • Ano ang ibig sabihin ng tanka<br>​
    5·1 answer
  • Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with
    15·1 answer
  • (1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a
    10·1 answer
  • Need Help Please
    7·1 answer
  • You should move around and take a rest for 30 minutes every 5 minutes.<br><br>True Or False​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!