Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Drawing Characters C++ Problem Description Annie is trying to draw character lines that she would like to use as decorations in her text messages to

Drawing Characters C++

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

Graph the function. f(x) = x - 1/2x 3

Answered: 1 week ago