Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

What is the Adlerian view of psychological testing?

Answered: 1 week ago