Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Year Population - repeat
#1
Hey, sorry maybe i wasnt specific enough in my last post....i wanted it to be in a for..next loop, and when it prints out the year it prints out all the years till the one u specify...

Ex: ...2005, would print out all the years populations up to 2005 in a nice chart form...

Thanx for your help...
bye
A lie told often enough, becomes the truth"
Reply
#2
First off, were not here to do your homework..

second:

Code:
When posting a question, especially if its home work, you need to show that you have attempted it in some way. Either by showing some code that you have written or where your thoughts on the matter have stopped or got stuck.

Third off , its not hard, psuedo code, im sure you can port this

Code:
population = what you want
yearat = The year it stars off

for 0 to yeartogoto - (yearat +1)

'I added the + 1 becuase otherwise it would calculate it for year 2003
'Alternatively, you could just move the next statement after the print statement

population = population *1.05

PRINT "your popluation is  "; population
next

'Please note im intentionally not using fully compatible qb code so you still have some work to do
'And to get the current population you use the variable you are looping with + year at


And finally, instead of wriing a WHOLE NEW TOPIC, you can reply right?

Please, try it yourself first, THAN ask question.
b]Hard Rock[/b]
[The Stars Dev Company] [Metal Qb flopped] [The Terror]
Stop Double Posts!
Whats better? HTML or Variables?
Reply
#3
Look i did try it, and i didnt bother writing the code out...i asked for help, but not ur smart @$$ comments ok?

thanx for the help.
A lie told often enough, becomes the truth"
Reply
#4
Wat would the pop of yr 1 b
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#5
Quote:Look i did try it, and i didnt bother writing the code out...i asked for help, but not ur smart @$$ comments ok?

Better a smarta$$ than a dumba$$. [Image: biggrin.gif]
Reply
#6
...we're cussing in l33t now?

as for dr. suess, i'm going to have to side on hard rock on this one. after all, you asked for advice, you can take it or leave it.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#7
Smile

And on a side note, it should be for 0 to yeartogoto - yearat, i edited the post so the it looks neater.
b]Hard Rock[/b]
[The Stars Dev Company] [Metal Qb flopped] [The Terror]
Stop Double Posts!
Whats better? HTML or Variables?
Reply
#8
Hey, thanx alot guys for your help, i finished the program....i had all that code b4, cept i was using a do...loop and not the for ...next....

Anyways, thanx alot and i appreciate it
bye
A lie told often enough, becomes the truth"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)