dcsimg
Results 1 to 2 of 2

Thread: GW-Basic coding question...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    107

    GW-Basic coding question...

    Hi..
    I know GW basic is quite antiquated, but my nephew is trying to learn it, so I decided to check it out myself.
    For now, we are stuck on page 1 I need to know how to write a program what will give the following output..

    12345
    1234
    123
    12
    1

    I know its simple, but some help would be well appreciated.
    Regards

  2. #2
    Hyperactive Member Max Peck's Avatar
    Join Date
    Oct 2007
    Posts
    384

    Re: GW-Basic coding question...

    Ahh, good old GWBASIC. Wrote many happy lines with that thing years ago. Here you go, this should work.

    10 FOR I=5 TO 1 STEP -1
    20 PRINT LEFT$("12345", I)
    30 NEXT I
    -Max
    The name's "Peck" .... "Max Peck"

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." - Red Adair

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width