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
Snezhnost [94]
3 years ago
13

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: Define and use a loop variable.
Sample program:
#include
using namespace std;

int main() {
PrintShampooInstructions(2);
return 0;
}
Computers and Technology
2 answers:
Finger [1]3 years ago
8 0

Answer:

public static void PrintShampooInstructions(int numberOfCycles){

       if (numberOfCycles<1){

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

       }

       else if(numberOfCycles>4){

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

       }

       else

           for(int i = 1; i<=numberOfCycles; i++){

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

           }

       System.out.println("Done");

   }

Explanation:

I have used Java Programming language to solve this

Use if...elseif and else statement to determine and print "Too Few" or "Too Many".

If within range use a for loop to print the number of times

Nady [450]3 years ago
4 0

Answer:

#In Python

def shampoo_instructions(num_cycles):

   if num_cycles < 1: ///

       print ('Too few.') ///

   elif num_cycles > 4:

       print ('Too many.')

   else:

       i = 0

       while i<num_cycles:

           print (i+1,": Lather and rinse.")

           i = i + 1

       print('Done.')

user_cycles = int(input())

shampoo_instructions(user_cycles)

Explanation:

def shampoo_instructions(num_cycles): #def function with loop

   if num_cycles < 1:  #using 1st if statement

       print('Too few.')

   elif num_cycles > 4:

       print ('Too many.')

   else:

       i = 0

       while i<num_cycles:

           print (i+1,": Lather and rinse.")

           i = i + 1

       print('Done.')

user_cycles = int(input())

shampoo_instructions(user_cycles)

You might be interested in
Universal Containers wants to use a sandbox with real data in it. Which Sandboxes three would you recommend?
laila [671]

Answer:

c. Full Sandbox

d. Partial Sandbox

e. Developer Pro

Explanation:

Universal Containers wants to use a sandbox with real data in it. Which Sandboxes three would you recommend?

a. Test Sandbox

c. Test Sandbox

c. Full Sandbox

d. Partial Sandbox

e. Developer Pro

From the question, we are informed that Universal Containers wants to use a sandbox with real data in it. In this case I will recommend Full Sandbox, Partial Sandbox and Developer Pro.

Sandboxes. In cybersecurity sandbox can be explained as security mechanism that is utilized to separate running programs, and this is an effort utilized to curb system failure as well as software vulnerabilities to disperse.

Sandboxes are crucial when executing suspicious code, it helps to do this so that the host device is is not put to risk of harm. Since, Containers wants to use a sandbox with real data in it then the three types of sandboxes can be use.

✓Full sandboxes allows performance testing as well as staging it can be regarded as copy of production org, and these can be objects attachment and others

✓Partial Copy Sandbox can be allows copying of configuration and part of one's data, in order to allow new configuration testing with one's real data.

5 0
2 years ago
The web lab consists of which elements. Select all that apply. Group of answer choices Files Inspector Tool Preview Hints Work S
djverab [1.8K]

Answer:

Inspector Tool

Preview

Work Space

Instructions

Explanation:

Web Lab is a function that incorporates HTML in web development. It has functions such as Workspace where the developer writes the body of the website. Preview helps the developer take a look at the final product of what he is creating. Instructions panel provides a list of the different types of html packages that the developer can chose from.

All of these options help the developer produce a website that is up to standard.

8 0
2 years ago
What considerations should you make when deciding on the size of a table?
Kisachek [45]

Answer:

You should consider the number of cells needed for data, labels, titles, and formulas.

Explanation:

4 0
2 years ago
Many contemporary languages allow two kinds of comments: one in which delimiters are used on both ends (multiple-line comments),
m_a_m_a [10]

Answer and Explanation:

Multiple-line comments :

Advantage :In the event that we need to remark out of zone of the given program , we can utilize it.

Disadvantage : In numerous line results are in reduced unwavering quality. It stretches out the remark as far as possible of the following comment.For least difficult approach to unintentionally leave off the last delimiter, which successfully expelling code from the program.

Single Line Comments :

Advantage :In the event that you need to close all the delimiter before close the program we utilize this kind of remarks.

Disadvantage : It put more burden on your program .It repeated on every line of a block of comments

3 0
2 years ago
Is Flip book drawings, frame by frame (need great drawing skills).
lyudmila [28]
I would say traditional animation
7 0
3 years ago
Other questions:
  • To gain one pound of fat, how many extra calories would you need to consume?
    12·1 answer
  • Would anyone know this
    10·2 answers
  • What color is the smartart tolls tab?
    5·1 answer
  • Jerry wants to save his company money. He decides to move to open source software for his word processing needs. Jerry then down
    5·1 answer
  • . Explain and demonstrate the functionality of timer devices in an embedded system[
    9·1 answer
  • What do financial planning skills ultimately enable an individual to do?
    10·2 answers
  • What is adobe photoshop?
    10·2 answers
  • Which of the following is NOT true about a flow chart?
    8·1 answer
  • A motor is controlled by a logic circuit. The circuit has inputs (0 or 1) from three sensors
    8·1 answer
  • In python:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!