## CCC '01 J1 - Dressing Up

View as PDF

Points: 3
Time limit: 2.0s
Memory limit: 256M

Problem type
##### Canadian Computing Competition: 2001 Stage 1, Junior #1

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 of the bow tie, where is an odd positive integer greater than or equal to 5. A bow tie with rows (and columns) should then be printed using the pattern shown below in the sample output.

#### Input Specification

One line containing integer . You may assume that all input data will be valid.

#### Sample Input 1

5

#### Sample Output 1

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

#### Sample Input 2

7

#### Sample Output 2

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

• commented on Aug. 29, 2022, 4:20 p.m.

This comment is hidden due to too much negative feedback. Show it anyway.

• commented on Aug. 30, 2022, 11:18 a.m.

It says that H has to be an odd positive number on the third line so you will never get an even number.

• commented on Jan. 6, 2023, 1:07 a.m.

sorry

• commented on July 3, 2020, 5:06 p.m.

My handsome little computer is getting fancy

• commented on Dec. 2, 2021, 4:14 p.m.

lol

• commented on June 2, 2020, 8:24 p.m.

Wow I just made the world's most useless program

• commented on Oct. 12, 2016, 8:01 p.m.

When I test my code off of the website, it displays the proper output, yet when it's published to the website, I get WA three times in a row. Does my output have to be printed all at once, or can each line be printed separately? I'm not sure if that is the problem.

• commented on Oct. 12, 2016, 8:32 p.m.

You're printing an extra blank line both before the bowtie and after.