Computer Science Canada

Help Guys

Author:  mac [ Wed Nov 06, 2002 6:12 pm ]
Post subject:  Help Guys

Help me out on something guys


Make a program to compute the bank balance at the end of each year for 10
Years resulting from an initial deposit $1000 and an annual interest rate of
6%.Output for each year end the number of the year, the initial balance, the interest for the year, and the balance at the end of the year.



Write a program using a loop counting backwards. Output the index of the
Loop on each execution so the output is the same as the count down for a
Rocket launch. Arrange the output so that it is all on one line like this

5 4 3 2 1

Author:  Tony [ Thu Nov 07, 2002 7:51 am ]
Post subject: 

that sounds too much like a homework assigment... ask your teacher, he/she should help you with it Wink

well ya, often they don't... but I'm not gonna do your homework for you

Author:  Dan [ Thu Nov 07, 2002 7:54 am ]
Post subject:  looooooooop

there are two mian ways to do then sconed one they are like this:

code:

var n: int:= 10 %vlaue to sotre cownt down

loop
put n, " ".. %out put the vlaue then a space on same line
n -= 1 %decers vlaue
delay (500) %slow down the progame
exit when n = 0 % exit when it is 0
end loop

put "Take off!!!"



and......

code:

for decreasing i: 10 .. 1
put i, " ".. %out put the number
delay (500) %slow down the out put
end for

put "Take off!!!"


: