207k views
2 votes
Write pseudo code to calculate the sum 10+20+30+.....+100?​

User Gpwr
by
7.5k points

2 Answers

4 votes

Answer:160

Step-by-step explanation:

!0+20=30

30+30+60

60+100=!60

User Ashraf Sarhan
by
7.8k points
4 votes

Answer:

sum = 0

for i in range(10, 101, 10):

sum += i

print(sum)

This pseudo code uses a for loop to iterate through a range of numbers from 10 to 100, incrementing by 10 each time. The variable sum is initialized to 0, and each iteration of the loop adds the current value of i to the sum. Finally, the code prints the value of sum which is the sum of the series 10+20+30+.....+100.

Step-by-step explanation:

User Amada
by
7.4k points