HOW TO WRITE pseudocode
TO add the number 1 to 100 and display the sum
START
SET sum to 0
FOR i from 1 to 100 DO
SET sum to sum + i
END FOR
DISPLAY sum
END
Writing pseudocode for adding the numbers 1 to 100 and displaying the sum:
Step 1: Initialize a variable called "sum" to 0.
Step 2: Create a loop that iterates from 1 to 100.
Step 3: Inside the loop, add the current number to the "sum" variable.
Step 4: After the loop ends, display the value of the "sum" variable.
Pseudocode:
sum = 0
for i = 1 to 100 do
sum = sum + i
display sum