1. Set a variable "sum" to 0.
2. Create a loop to iterate through the numbers 1 to 100.
3. For each iteration, add the current number to the "sum" variable.
4. After the loop is complete, display the value of "sum" to the user.
Pseudo code:
sum = 0
for i in range(1,101):
sum += i
print(sum)
HOW TO drow algorithm
TO add the number 1 to 100 and display the sum
1 answer