write an algorithm for additiona of first n numbers
Answers
Answered by
0
Answer:
Without Using Loop – Using Formula:
main()
int num, sum;
printf("\n Enter the number: ");
scanf("%d",&num);
sum = num*(num+1)/2;
printf("\n\n The sum of natural number is: %d\n ", sum);
Similar questions