Computer Science, asked by narpitaarpita776, 1 year ago

Write an algorithm for adding n natural numbers and find the space required by that algorithm

Answers

Answered by alshifakhan56
7

Answer:

ooooòoooooooooooooooooooooo

Answered by nishuarya2000
4

Answer:

#include<stdio.h>

main()

{

int number, sum;

printf("\n enter the number");

sum = no*(number+1)/2;

printf("n\n the sum of natural no is: %d\n", sum) ;

}

Explanation:

Space Complexity = Auxiliary space + Space use by input values.

Similar questions