Answer:
See explaination
Step-by-step explanation:
Source code below.
#include <iostream>
using namespace std;
// <STUDENT CODE>
// Define the function PrintShampooInstructions().
void PrintShampooInstructions(int numCycles)
{
// Display "Too few." if the value
// of numCycles is less than 1.
if (numCycles < 1)
{
cout << "Too few." << endl;
}
// Display "Too many." if the value
// of numCycles is greater than 4.
else if (numCycles > 4)
{
cout << "Too many." << endl;
}
// Otherwise, do the following:
else
{
// Define the loop variable.
int N = 1;
// Start the loop from 1 to numCycles.
for (N = 1; N <= numCycles; N++)
{
// Print the value of N followed by "Lather and rinse".
cout << N << ": Lather and rinse." << endl;
}
// Print "Done." followed by newline.
cout << "Done." << endl;
}
}
// Define the main() function.
int main()
{
PrintShampooInstructions(2);
return 0;
}
Please kindly check attachment for sample output and program screen shot.