Question: Write a program that asks the user to type in a character and the number of times it should print it . I then should

Write a program that asks the user to type in a character and the number of times it should print it. I then should print the character the correct number of times. It then asks the user if they want to do it again.
Note: This program will have two loops. First, start by just getting it to print the character to print the correct number of times. Then, add the code to allow the user to do it again.
Sample Output
Enter character to print: =
Enter number of times to print it: 4
====
Do you have another character you want to print? (y/n): y
Enter character to print: @
Enter number of times to print it: 7
@@@@@@@
Do you have another character you want to print? (y/n): y
Enter character to print: 4
Enter number of times to print it: 2
44
Do you have another character you want to print? (y/n): n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!