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
PC’s &amp; More has shifted to sales and service of laptops and PCs, where it has the potential to triple the number of its cust
photoshop1234 [79]

Answer:

Growth Strategy

Explanation:

A growth strategy is a plan of action that allows you to achieve a higher level of market share than you currently have. Such as the case in the question, PC's shifted so sales and service of Laptops and PCs because there is a greater market share for them there than where they currently operate from.

5 0
3 years ago
Which of the following describes the phishing method of information security crime?
Marianna [84]
<span>C. pretending to be someone else when asking for information</span>
3 0
3 years ago
Read 2 more answers
A10:A20 Refer to values in
Keith_Richards [23]
The range of cells in column A and rows 10 through 20
8 0
2 years ago
Write a program to output the following quote by Edsger W. Dijkstra:
ki77a [65]

In python 3.8:

print("\"Computer Science is no more about \ncomputers\nthan astronomy is about telescopes\"\n-Edsger W. Dijkstra")

I hope this helps!

5 0
3 years ago
Jen's house contains the following devices:
poizon [28]

Answer:

Jen's laptop and her daughter's phone, because they are both connected to the router and turned on.

Explanation:

A network comprises of two or more interconnected devices such as computers, routers, switches, smartphones, tablets, etc. These interconnected devices avail users the ability to communicate and share documents with one another over the network.

Additionally, in order for a network to exist or be established, the devices must be turned (powered) on and interconnected either wirelessly or through a cable (wired) connection.

Hence, the computers which are currently networked are Jen's laptop and her daughter's phone, because they are both connected to the router and turned on. A smartphone is considered to be a computer because it receives data as an input and processes the input data into an output (information) that is useful to the end user.

6 0
2 years ago
Other questions:
  • Some financial institutions can be really bad about putting unexpected charges
    12·1 answer
  • Consider what fact-finding techniques you would use to identify the important facts needed to develop a database system. Please
    7·1 answer
  • Working for the Internal Revenue Service is a career in public safety. A. True B. False
    14·1 answer
  • I analyze data, as a consultant, for companies making important business decisions. In order to get my point across, which of th
    11·1 answer
  • A process that rearranges the data and objects in a database to decrease its file size, thereby making more space available on y
    11·1 answer
  • Think of an example in your life where a number could be described as data, information, and knowledge
    14·1 answer
  • A network systems administrator would most likely help with
    13·2 answers
  • Consider the security of a mobile device you use
    6·1 answer
  • Stay at least _____ behind the vehicle ahead of you at all times.
    12·2 answers
  • What is cache memory?Mention its importance. ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!