Write an algorithm for adding n natural numbers and find the space required by that algorithm
Answers
Answered by
7
Answer:
ooooòoooooooooooooooooooooo
Answered by
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