29
2
Special Independence Day (USA) themed challenge for you today. You must write a program that prints this ascii-art representation of The American Flag.
0
|---------------------------------------------------------
| * * * * * * #################################|
| * * * * * |
| * * * * * * |
| * * * * * #################################|
| * * * * * * |
| * * * * * |
| * * * * * * #################################|
| * * * * * |
| * * * * * * |
|########################################################|
| |
| |
|########################################################|
| |
| |
|########################################################|
| |
| |
|########################################################|
|---------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Trailing spaces on each line, as well as one trailing newline, are allowed.
Note that this isn't quite the way the flag should look, but it's the closest I could get with ASCII.
As usual, this is code-golf so standard loopholes apply and shortest answer in bytes wins!
Is trailing whitespace allowed? – Dennis – 2015-07-04T17:04:21.307
@Dennis as long as it's not excessive I don't see why not. So one trailing newline is OK. – James – 2015-07-04T17:23:17.473
What about trailing spaces on the individual lines? – Dennis – 2015-07-04T17:24:50.193
@Dennis yeah, that's fine. – James – 2015-07-04T17:25:35.413
9I would make this a pop-contest and see who prints the most realistic flag. – None – 2015-07-04T19:08:46.450
7@Hosch250 That would end up closed as "art contest" – Sp3000 – 2015-07-04T19:09:32.443
Oh, I didn't know the rules about that changed since I was here. – None – 2015-07-04T19:15:30.273
@Hosch250 the full correct spec of the flag is at https://en.wikipedia.org/wiki/Flag_of_the_United_States . You can't get more realistic than that. It might be worth asking as a codegolf next 4th of July . As far as I can tell it's never been asked. http://codegolf.stackexchange.com/q/28784/15599 is the closest I could find. An interesting difference between this challenge and the real flag is that the stars area should reach as far as the bottom of the 7th stripe (red) but I don't think it would have been very visually appealing in ASCII art.
– Level River St – 2015-07-04T23:20:09.2331@steveverrill Yes, but we could draw a flag rippling in the breeze, perhaps. – None – 2015-07-04T23:21:01.880