Posted: Wed Nov 06, 2002 6:36 pm Post subject: hELP MAKE WRITE A PROGRAM
hELP MAKE WRITE A PROGRAM
Write a program contaning an infinite loop whice output the series of integers starting at 5 and going up by 5s. revise the program to output the integer starting at 5 and decreasing by 10,s use a counter.
Posted: Thu Nov 07, 2002 7:39 am Post subject: loop
up by 5
var n: int := 0 %decare a varible that saters at 0
n += 5 % add 5 to the vlaue
put n %show the value
delay (500) %slow down the output
down by 5
var n: int := 5 %decare a varible that saters at 5
n -= 10 %take away 10 from vlaue
put n %show the vlaue
delay (500) %slow donw the output
hope that helps
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!