Question: Drawing Characters C++ (NOT ALLOW ARRAY AND STRING) Problem Description Annie is trying to draw character lines that she would like to use as decorations

Drawing Characters C++

(NOT ALLOW ARRAY AND STRING)

Problem Description

Annie is trying to draw character lines that she would like to use as decorations in her text messages to her friends. She has a list of integer and character pairs that she uses as basis for drawing out the lines. Write a program that will help her accomplish the task more quickly.

Input Format

The input begins with an integer N indicating the number of integer and character pairs that follows.

The succeeding lines are pairs of an integer T and a character C, where denotes how many characters should be printed to create the line. The T and C pairs are separated by a space. C could be any of the following characters: *, #, @

Output Format

For each T and C pair, print number of character/s with no spaces in between. Drawn lines for each pair must be in its own line in the output. If is not among the acceptable characters, print "Cannot draw!" without the quotation marks.

Constraint

1 <= N <= 100

1 <= T <= 100

C can be any of the following: *, #, @

Sample Input

3 5 * 10 @ 15 # 

Sample Output

***** @@@@@@@@@@ ###############

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 Databases Questions!