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
Of the measures of feasibility, questions such as "Does the proposed platform have sufficient capacity for future needs?" and "W
larisa [96]
Operational feasibility !!!!!!!
8 0
4 years ago
Write the pseudo-code of an algorithm that returns the sum of all integers in a list of integers. You may use the Pascal-like ps
Arlecino [84]

Answer:

//variable integer_list to hold a list of integers

DECLARE integer_list

ASSIGN values to integer_list

//variable sum to hold the sum of the elements in the list

DECLARE sum

ASSIGN zero to sum

//loop through the integer_list and sum all it's elements together.

for(int i=0; i<integer_list.size(); i++){

sum += interger_list.get(i)

}

//Show the result of the addition from the for loop

DISPLAY "The sum is " + sum

Explanation:

The above code uses some hypothetical programming language syntax. The second and third lines declare an arbitrary integer list and assign a set of values to it respectively.  

The fifth line declares a variable "sum" which will hold the result of summing all the elements in the list. The sixth line initializes "sum" to zero.

The for loop shown iterates through the integer list cumulatively summing its elements.

The result is displayed as written on line 12.

Hope it helps!  

3 0
4 years ago
On Brainly, how can I change my username? from halfsidepancake​
klio [65]

Answer:

unfortunately you cant change your username.... i tried 2 and the only way is to make a new account

Explanation:

8 0
3 years ago
Read 2 more answers
Network administration is concerned with which tasks?
Yuri [45]

A user hacking or looking up utter nonsense....sorry if it didn't help

3 0
4 years ago
Read 2 more answers
A network administrator is required to upgrade wireless access to end users in a building. To provide data rates up to 1.3 Gb/s
soldi70 [24.7K]

Answer:

802.11ac

Explanation:

the newest wireless standard that provides data rates up to 1.3Gbps is the 802.11ac, its speed is three times faster than 802.11n and uses the 5GHz frequency range though there are some that uses 2.4GHz for dual support.

this Wireless standard has better features such as high speed file transfers and HD video streaming.

7 0
3 years ago
Other questions:
  • What instruments are used the measure voltage, current, and resistance
    7·1 answer
  • A network using multiple cell towers falls under which type of network?
    13·1 answer
  • Write qbasic code for given pattern<br><br>NEPAL<br>. EPA<br>. P​
    12·1 answer
  • Software companies will often release a(n) ___ version to a limited audience that will test it on their systems. Programmers can
    11·1 answer
  • The GNU/Linux operating system comes with many built-in utilities for getting real work done. For example, imagine you had to an
    10·1 answer
  • Simon is producing a report on major rivers in North America. In the report he wants to add a table that displays the statistics
    12·1 answer
  • CAN YOU PLEASE HELP WITH THIS DUE IN 10 MINUTES
    8·1 answer
  • If you forget your privacy password what will you do if the ask this question what is the name of one of your teacher?​
    12·1 answer
  • Suppose that a t-shirt comes in five sizes: S, M, L, XL, XXL. Each size comes in four colors. How many possible t-shirts are the
    11·1 answer
  • What are some innovations that television has undergone since its original invention ?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!