SET total TO 0 #The variable 'total is used to store the sum of numbers. FOR goes FROM 1 TO 10 DO #A loop is set up to run from 1 to 10 as there are 10 numbers. SEND 'Please enter a number.' TO KEYBOARD #The user is asked to enter a number. RECEIVE number FROM (INTEGER) KEYBOARD SET total TO total + number #The total is calculated. END FOR #This closes the 'for' loop. SEND total TO PRINTER #The sum of the numbers is output.
FOR
1 TO 10
1,2,3,4,5,6,7,8,9,10
SET total TO total + number
total
number
(total + number)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)