2001 Canadian Computing Competition, Stage 1

Problem J1: Dressing Up

It is important to keep our computers safe and clean. Some people feel that computers should be well-dressed, also. For this question, you will write a program to print out a bow tie on the computer screen.

Your program should take as input the height H of the bow tie, where H is an odd positive integer greater than or equal to 5. A bow tie with H rows (and 2H columns) should then be printed using the pattern shown below. You may assume that all input data will be valid.

Sample Input 1

5

Sample Output 1

*        *
*** ***
**********
*** ***
* *

Sample Input 2

7

Sample Output 2

*            *
*** ***
***** *****
**************
***** *****
*** ***
* *

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Sep 27, 2008

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

It's quiet in here...