Computer Science, asked by neelamshukla4321, 5 months ago


1) Write an Algorithm to print the sum of first n natural numbers. 4 marks.........​

Answers

Answered by roshanidhami82
1

Answer:

  • Declare and initialize variable, i,num, s=0.
  • Enter the value of num i.e. number upto which sum is to be calculated.
  • Use Loop to add number. Any of while, do-while or for loop can be used.
Similar questions