Write a program that asks the user to enter an integer between 1 and 15. If the
ID: 3655181 • Letter: W
Question
Write a program that asks the user to enter an integer between 1 and 15. If the number entered is outside that range, your program should print out an error message and re-prompt for another number. Once the user enters a number in the correct range, your program will print out two patterns of asterisks that look like the following. Note that the number provided by the user is equal to the height of the pattern. If the input value is 8, then the output should be: ******** ******* ****** ***** **** *** ** * ******** ******* ****** ***** **** *** ** *Explanation / Answer
#include using namespace std; int main(){ int num; do{ coutnum; if(num>15||numRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.