News:

Wieners, Brats, Franks, we've got 'em all.

Main Menu

Help!

Started by skip, November 15, 2006, 12:42:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ender

I always feel that when people ask for help on homework it forces the forum members into a moral dilemma. The people who assist never know for sure whether the teacher allows it or whether the person asking for help is honest.

Anyways, hints...

That's not how compound interest works. It semantically resembles it but is conceptually stranded. If you have any questions about compound interest, post in the math forum ^_^.

Ender

mm, and another hint

Your code doesn't make sense. You're reassigning a variable to a constant times a constant plus a constant each iteration of the for-loop.

Ender

Quote from: dlStevens on November 15, 2006, 12:48:52 PM
Uhh.. I don't think anyone here *uses* or *knows* QBasic.... :P

How does that prevent people from helping?

Woops, triple posted =\ Mods feel free to merge these...

Blaze

#18
CLS

'By Ian Fox
'November 21, 2006
'Some guys homework

DIM dblCurrentBalance AS DOUBLE         'The current balance
DIM sinInterestRate AS SINGLE           'The interest rate
DIM intInvestmentLength AS INTEGER      'How many years they are investing
DIM i AS INTEGER                        'A temporary variable used for FOR LOOPing


DO
        INPUT "How much money would you like to invest"; dblCurrentBalance
        PRINT "You must enter a value greater then `0'."
LOOP UNTIL dblCurrentBalance > 0

CLS

DO
        INPUT "What is the Interest rate on your investment"; sinInterestRate

        PRINT "The interest rate must not be a negative number."
LOOP UNTIL sinInterestRate >= 0

CLS

DO
        INPUT "How many full years would you like to invest"; intInvestmentLength
        PRINT "The amount of years must be positive."
LOOP UNTIL intInvestmentLength > 0

CLS

'Okay, we have all of our values and hopefully due to some basic
'error checking, everything should turn out correctly.. or at least
'it should make sense.


PRINT "You start out with $"; dblCurrentBalance; "invested at an interest rate of "; sinInterestRate; "%."

sinInterestRate = sinInterestRate * .01 'Make the interest rate a decimal for multiplying

FOR i = 1 TO intInvestmentLength
        dblCurrentBalance = dblCurrentBalance + (sinInterestRate * dblCurrentBalance)
        PRINT USING "After year ### you have $ ###########.## invested."; i; dblCurrentBalance
NEXT i


Meh, I think I shouldn't have wrote this... but I was bored.
And like a fool I believed myself, and thought I was somebody else...

Sidoh

Now how's he supposed to learn anything? >:(

Ender

Yes, that was a hindrance to his learning. And although one may plausibly argue that such a transgression causes insignificant disturbance to the educational system, it is more a matter of morality. Just like downloading music illegally.

*braces himself for angry responses*

Sidoh

Quote from: Ender on November 22, 2006, 02:53:15 PM
Yes, that was a hindrance to his learning. And although one may plausibly argue that such a transgression causes insignificant disturbance to the educational system, it is more a matter of morality. Just like downloading music illegally.

*braces himself for angry responses*

Go fuck the RIAA.  We don't care about your stance on downloading music. 

Illegally downloading music has nothing to do with posting code for a homework assignment.  You just want attention.

Ender

My favorite artists, Sigur Ros and Explosions in the Sky, distribute their music freely on their sites. Ergo my taste of music is superior.

Sidoh

Quote from: Ender on November 22, 2006, 03:47:42 PM
My favorite artists, Sigur Ros and Explosions in the Sky, distribute their music freely on their sites. Ergo my taste of music is superior.

So does Heathen.  I'm pretty sure you could find places that allow you to download their composures of Vivaldi, Bach, Mozart and Beethoven legally, therefore, you suck at analyzing your taste in music. ;)

Blaze

Feel free to delete it, I originally was just going to do it but not post it, but then I changed my mind.
And like a fool I believed myself, and thought I was somebody else...

AntiVirus

A lot of my indie bands post their music on the Internet for free downloads.
The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Joe

Quote from: Warriorx86] link=topic=7904.msg99233#msg99233 date=1163721836]
Quote from: Joex86] link=topic=7904.msg99216#msg99216 date=1163719564]
Quote from: dlStevens on November 15, 2006, 01:51:17 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?

I'm sixteen. I started programming basic AppleScript back in like.. third grade. So yeah, I was programming at the age of eight. From there I stepped up to some Commodore / Apple II BASIC, which I've completely forgotten. Eventually I moved at the beginning of a summer vacation and found myself in my room, programming, 24/7, becoming the God of VB.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


MyndFyre

Quote from: Joex86] link=topic=7904.msg100480#msg100480 date=1164537694]
I'm sixteen. I started programming basic AppleScript back in like.. third grade. So yeah, I was programming at the age of eight. From there I stepped up to some Commodore / Apple II BASIC, which I've completely forgotten. Eventually I moved at the beginning of a summer vacation and found myself in my room, programming, 24/7, becoming the God of VB.

Joe, there are a lot of things I would call you.  God of VB is not on that list.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Blaze

Quote from: MyndFyrex86] link=topic=7904.msg100481#msg100481 date=1164537834]
Quote from: Joex86] link=topic=7904.msg100480#msg100480 date=1164537694]
I'm sixteen. I started programming basic AppleScript back in like.. third grade. So yeah, I was programming at the age of eight. From there I stepped up to some Commodore / Apple II BASIC, which I've completely forgotten. Eventually I moved at the beginning of a summer vacation and found myself in my room, programming, 24/7, becoming the God of VB.

Joe, there are a lot of things I would call you.  God of VB is not on that list.

I love you.
And like a fool I believed myself, and thought I was somebody else...

Joe

Quote from: MyndFyrex86] link=topic=7904.msg100481#msg100481 date=1164537834]
Quote from: Joex86] link=topic=7904.msg100480#msg100480 date=1164537694]
I'm sixteen. I started programming basic AppleScript back in like.. third grade. So yeah, I was programming at the age of eight. From there I stepped up to some Commodore / Apple II BASIC, which I've completely forgotten. Eventually I moved at the beginning of a summer vacation and found myself in my room, programming, 24/7, becoming the God of VB.

Joe, there are a lot of things I would call you.  God of VB is not on that list.

Compared to some people though, I'm rather good, no? :P
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.