Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help Guys
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mac




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Nov 07, 2002 7:51 am   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: 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!!!"
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: