Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print'a'Box using Astrix
#6
oh...yeah..... that one. oh... oh..... ok..... i'll just slap myself on the head.

Code:
INPUT "What width and height do you want? ", A%, B%
FOR I% = 1 to A%
FOR J% = 1 to B%
PRINT "*"; 'If you don't have the ;, QBASIC will automatically add a carriage return (skip to the next line)
NEXT J%
PRINT
NEXT I%

or with string$ um I guess:

Code:
INPUT "What width and height do you want? ", A%, B%
FOR I% = 1 to A%
PRINT STRING$(B%, "*")
NEXT I%


Well I really ruined this guy's future career in CS by giving him the answer, didn't I?

EDIT: made length width and added a chr$(32).
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Messages In This Thread
Print'a'Box using Astrix - by n00b_e - 05-09-2003, 07:06 AM
Print'a'Box using Astrix - by wizardlife - 05-09-2003, 07:09 AM
Yes - by n00b_e - 05-09-2003, 07:14 AM
don't confuse the poor boy. - by Agamemnus - 05-09-2003, 07:17 AM
Re: don't confuse the poor boy. - by wizardlife - 05-09-2003, 07:40 AM
Print'a'Box using Astrix - by Agamemnus - 05-09-2003, 07:45 AM
Print'a'Box using Astrix - by wizardlife - 05-09-2003, 08:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)