Computer Science, asked by harinibibipet15, 5 days ago

13) sum of the first five natural numbers algorithm and flowchart​

Answers

Answered by s19317aarpita01104
0

Answer:

15

Explanation:

1+2+3+4+5=15 it is your solution

i think its help you

thankyou

Answered by SabrinaHaque
0

Answer:

This is very quick question in this type questions a formula is……

S=n(n+1)/2

hear s= sum of n number

see the image for flowchart

Algorithm:

1.)Start

2.)Declare a variable of type int i=1 and sum=0

3.)Iteration

for i=1 and i<=5

{

sum = sum + i

increment i = i + 1

}

4.)Print Sum

5.)Stop

Attachments:
Similar questions