Computer Science, asked by itsmeaarfa082, 4 months ago

Integer i,j,sum, n;
Set sum=0, n=7;
Repeat for i=1 to n
Repeat for j=1 to i
sum=sum+j
End loop
End loop
Print sum​

Answers

Answered by mtahir27
0

Answer:

I think sum is 21.

Explanation:

sum=0+1

1+2=3

3+3=6

6+4=10

10+5=15

15+6=21

Answered by jahanvi567
0

We recall the concept of program

Program is a procedure for solving a problem with a computer

Given:

Repeat for i=1 to n

Repeat for j=1 to i

sum=sum+j

From above we get,

When i=1,j=1

Sum=1

When i=2,j=1,2

Sum=4

When i=7,j=1 to 7

Sum=84

The sum is 84

Similar questions