Computer Science Canada making a hollow asterisks box |
Author: | junkpro11 [ Sun Apr 25, 2004 8:34 pm ] | ||
Post subject: | making a hollow asterisks box | ||
im a noob at turing...im prob the worst in class cuz logic isnt my stong suit.and i took programming to learn sth different. can anyone help me how to make a hollow asterisk box with number of stars across input eg. the input is 4 the box would be **** * * * * * * **** my code doesnt work....it onli makes this **** ** ** ****
|
Author: | junkpro11 [ Sun Apr 25, 2004 8:36 pm ] |
Post subject: | |
what the? the boz is supposed to be outlined by asterisks but the inside is supposed to hollow dunno y the msg appeared funni ![]() |
Author: | Delos [ Mon Apr 26, 2004 9:49 am ] | ||
Post subject: | |||
Hey, this is easy actually! Just add an 'else' statement to your if condition.
It look funny on the board due to some odd space removal thing used... |
Author: | Flashkicks [ Mon Apr 26, 2004 10:34 am ] |
Post subject: | |
I remember having to do this when i was in grade nine! ![]() ![]() ![]() ![]() ![]() |
Author: | Raugrist [ Mon Apr 26, 2004 11:19 am ] | ||
Post subject: | |||
Even easier like this:
Good ol' repeat function. |
Author: | junkpro11 [ Mon Apr 26, 2004 8:49 pm ] |
Post subject: | |
thank you everyone! im in gr. 10 but teacher didnt teach us repeat yet... ![]() this question is on the hw sheet...to prepare us for the test on wed. u can see im not tat good with programming....lacking logic so ty for helping me!!!! |