Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: qbasic  (Read 3227 times)

0 Members and 1 Guest are viewing this topic.

sledgeda

  • Guest
qbasic
« on: November 24, 2004, 09:39:54 AM »
i have to build a program in qbasic to convert US dollars to Canadian..i can get it to run how do i get the money to be in the same line and not in the line above?

Neil



    Expert
  • Fear me Track. Noone can escape my wrath.
  • Thanked: 3
    Re: qbasic
    « Reply #1 on: November 24, 2004, 04:37:26 PM »
    Long time since I used qbasic... there are lots of better and easier languages.

    If you mean display the results on the same line, just take the two money variables and make a string like this
    (note: can't remember syntax... might not be + and $ might be before... long time since I used it...)

    result$ = "US$: " + usdollar + " and CAN$: " + candollar
    print result$

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: qbasic
    « Reply #2 on: November 24, 2004, 11:38:18 PM »
    Would help if we had just the relevant bit of your prog to view.

    However, if you code

    print usdollar.amt spc(2) candollar.amt

    or

    print usdollar.amt spc(2);
    print candollar.amt

    either of these will print the amounts on the same line with two spaces between (note the semicolon ";" on the second coding.)

    QBasic 4.5 is great!!
    One good deed is worth more than a year of good intentions.