Author Topic: Help!  (Read 10775 times)

0 Members and 1 Guest are viewing this topic.

Offline skip

  • Full Member
  • ***
  • Posts: 387
  • mmk
    • View Profile
Help!
« on: November 15, 2006, 12:42:45 pm »
with QBasic.

"Assume that your money is invested in an account that draws interest compounded annually. That is, at the end of each year the amount invested (principle) is multiplied by the interest rate, and that interest amount is added to the principle. Write a program, using a FOR.. NEXT LOOP, that will get the amount invested, the interest rate, and number of years from the keyboard (INPUT statements). It should then produce a printout showing how much money will be on hand at the end of EACH year."

So far, this is what I have:
Quote
INPUT "Enter amount to invest: ", moneyinvested
INPUT "Enter the interest rate: ", interestrate
INPUT "Enter number of years to invest: ", years

FOR X = years to 1 STEP -1
           totalmoney = (moneyinvested * interestrate) + moneyinvested
NEXT X

Any help would be appreciated!  :)

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: Help!
« Reply #1 on: November 15, 2006, 12:48:52 pm »
Uhh.. I don't think anyone here *uses* or *knows* QBasic.... :P

Offline Miamiandy

  • Full Member
  • ***
  • Posts: 187
  • SpAm In ThE cAn
    • View Profile
    • MyHouseGeek
Re: Help!
« Reply #2 on: November 15, 2006, 01:13:00 pm »
I know it a little though I haven't used it in ages. Also, I have a friend who just took a programming class online that for some reason programmed in QBASIC. 

In the loop add "PRINT totalmoney" I think that is what is need. I'll check when I get home and have the program, I think QBASIC is on my computer somewhere. QBASIC is a language that I haven't used in a long time.
Want to meet someone famous?  Cut out this coupon!

 ___________________

|This coupon good for  \
|ONE FREE hunting        \
|expedition with            /
|Dick Cheney.             /

 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Help!
« Reply #3 on: November 15, 2006, 01:46:51 pm »
I know QBASIC.

Basically you want a /PRINT "You have ", totalmoney/ in there

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: Help!
« Reply #4 on: November 15, 2006, 01:51:17 pm »
Ah, Why would you atempt to learn QBasic anyways?

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Help!
« Reply #5 on: November 15, 2006, 02:04:25 pm »
Ah, Why would you atempt to learn QBasic anyways?

Probably because he took a class where it was taught.  I can't think of any other reason...

Offline skip

  • Full Member
  • ***
  • Posts: 387
  • mmk
    • View Profile
Re: Help!
« Reply #6 on: November 15, 2006, 07:01:14 pm »
Ah, Why would you atempt to learn QBasic anyways?

Probably because he took a class where it was taught.  I can't think of any other reason...

Exactly.

@rabbit/Miamiandy: The program is far from finished than by just adding a simple PRINT statement. Re-read the instructions in my first post.  :P

Offline Miamiandy

  • Full Member
  • ***
  • Posts: 187
  • SpAm In ThE cAn
    • View Profile
    • MyHouseGeek
Re: Help!
« Reply #7 on: November 15, 2006, 07:11:29 pm »
You also need to another to plug total money back into the equation for every subsequent year following the first one.
Want to meet someone famous?  Cut out this coupon!

 ___________________

|This coupon good for  \
|ONE FREE hunting        \
|expedition with            /
|Dick Cheney.             /

 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Help!
« Reply #8 on: November 16, 2006, 06:26:04 pm »
Ah, Why would you atempt to learn QBasic anyways?

Rabbit was around back in the days of QBASIC, I think. In fact, I remember back when Windows 95 was bleeding edge, Windows 3.1 was commonplace, and Visual Basic 3 was the thing to do.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Miamiandy

  • Full Member
  • ***
  • Posts: 187
  • SpAm In ThE cAn
    • View Profile
    • MyHouseGeek
Re: Help!
« Reply #9 on: November 16, 2006, 06:51:32 pm »
The first language I learned was QBASIC and at the time I could use it quite well. Although, this was 8 or so years ago. I was in 3rd or 4th grade at the time I think.
Want to meet someone famous?  Cut out this coupon!

 ___________________

|This coupon good for  \
|ONE FREE hunting        \
|expedition with            /
|Dick Cheney.             /

 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Help!
« Reply #10 on: November 16, 2006, 07:03:56 pm »
Ah, Why would you atempt to learn QBasic anyways?

Rabbit was around back in the days of QBASIC, I think. In fact, I remember back when Windows 95 was bleeding edge, Windows 3.1 was commonplace, and Visual Basic 3 was the thing to do.

Arn't you like 15? So..you were programming at the age of like 8?
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Miamiandy

  • Full Member
  • ***
  • Posts: 187
  • SpAm In ThE cAn
    • View Profile
    • MyHouseGeek
Re: Help!
« Reply #11 on: November 16, 2006, 07:04:52 pm »
17 years old. I definitely was doing QBASIC in 4th and 5th. Nothing else till 7th though.
Want to meet someone famous?  Cut out this coupon!

 ___________________

|This coupon good for  \
|ONE FREE hunting        \
|expedition with            /
|Dick Cheney.             /

 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Help!
« Reply #12 on: November 16, 2006, 07:33:21 pm »
17 years old. I definitely was doing QBASIC in 4th and 5th. Nothing else till 7th though.

Not you, I quoted Joe for a reason :P
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Miamiandy

  • Full Member
  • ***
  • Posts: 187
  • SpAm In ThE cAn
    • View Profile
    • MyHouseGeek
Re: Help!
« Reply #13 on: November 16, 2006, 07:34:23 pm »
Oops, sorry.
Want to meet someone famous?  Cut out this coupon!

 ___________________

|This coupon good for  \
|ONE FREE hunting        \
|expedition with            /
|Dick Cheney.             /

 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Help!
« Reply #14 on: November 16, 2006, 10:01:31 pm »
I first learned to program QBASIC and Batch on Windows 3.11/MSDOS and (pwn) for OS/2 :P