Sum natural numbers

Input : Any natural number

V1

Logic : I used for loop and summ variable


V2

Logic : I used formula for sum of n natural numbers

Output: Sum of natural numbers

Comments

Popular posts from this blog

Maximum and minimum of three numbers