Computers and Technology, 11.04.2020 04:23 jeronimo18
Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, print "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.
So, this is what I have done.
#include
using namespace std;
void PrintShampooInstructions( int numCycles ) {
if (numCycles < 1) {
cout << "Too few." << endl ;
}
if (numCycles > 4 ) {
cout << "Too many." << endl ;
}
else {
int i = 0 ;
int N = 0 ;
for ( i = N ; i < numCycles ; ++i) {
cout << "i: Lather and rinse." << endl ;
cout << "Done." << endl ;
}
}
}
return ;
}
int main() {
PrintShampooInstructions(2);
return 0;
}
Answers: 2
Computers and Technology, 21.06.2019 18:30
Ineed on my history if anyone can check out the last few questions i posted and i will be posting !
Answers: 2
Computers and Technology, 22.06.2019 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe what
Answers: 1
Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If...
Chemistry, 05.09.2021 08:00
Mathematics, 05.09.2021 08:00
Physics, 05.09.2021 08:00
Mathematics, 05.09.2021 08:00
Mathematics, 05.09.2021 08:00
Mathematics, 05.09.2021 08:10
Mathematics, 05.09.2021 08:10
Chemistry, 05.09.2021 08:10
Mathematics, 05.09.2021 08:10
Health, 05.09.2021 08:10
Spanish, 05.09.2021 08:10
Mathematics, 05.09.2021 08:10
History, 05.09.2021 08:10
Mathematics, 05.09.2021 08:10
Mathematics, 05.09.2021 08:10