Professional Documents
Culture Documents
100 100 25
1 2 3 4 …. 15
BEGIN
DECLARE
Sum, x, AS INTEGER
ARRAY num[15] AS INTEGER
Sum 0
FOR x 1 TO 15 DO
PRINT “Enter a number”
READ num[x]
Sum sum + num[x]
ENDFOR
PRINT “Sum of the numbers is:”, sum
PRINT “The 11th number entered is:”, num[11]
PRINT “The numbers entered are:”
FOR x 1 TO 15 DO
PRINT num[x]
ENDFOR
END
FOR x 15 DOWNTO 1 DO
PRINT num[x]
ENDFOR {Prints the numbers from bottom to top}
BEGIN
DECLARE
X as integer
totalP As real
Array price[20] as real
Array itemname[20] string
totalP 0
FOR x 1 to 20 DO
Print “Enter the name and price of an item”
Read itemname[x], price[x]