461,891 views
10 votes
10 votes
Write an algorithm to calculate the sum of number between 1 to 100​

User Sukhpreet
by
3.4k points

2 Answers

15 votes
15 votes



DECLARE sum : REAL
DECLARE count : INTEGER
sum = 0

FOR count






User Martin Mulder
by
3.0k points
22 votes
22 votes

Algorithm

STEP 1: START.

STEP 2: DEFINE n, i, j.

STEP 3: SET sum =0.

STEP 4: SET n =100.

STEP 5: REPEAT STEP 6 to STEP 10 UNTIL i<=n.

STEP 6: REPEAT STEP 7 and STEP 8 UNTIL j<=i/2.

STEP 7: if i%j ==0.

STEP 8: sum =sum + j.Algorithm

STEP 1: START.

STEP 2: DEFINE n, i, j.

STEP 3: SET sum =0.

STEP 4: SET n =100.

STEP 5: REPEAT STEP 6 to STEP 10 UNTIL i<=n.

STEP 6: REPEAT STEP 7 and STEP 8 UNTIL j<=i/2.

STEP 7: if i%j ==0.

STEP 8: sum =sum + j.

User Clinton Pierce
by
2.8k points