
-----------------------------------
Nass
Wed Nov 06, 2002 6:36 pm

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.

-----------------------------------
Dan
Thu Nov 07, 2002 7:39 am

loop
-----------------------------------
up by 5


var n: int := 0 %decare a varible that saters at 0

loop
n += 5 % add 5 to the vlaue
put n %show the value
delay (500) %slow down the output
end loop



down by 5

var n: int := 5 %decare a varible that saters at 5

loop
n -= 10 %take away 10 from vlaue
put n %show the vlaue
delay (500) %slow donw the output
end loop


hope that helps
