write an algorithm to find the sum of first ten natural numbers
right answer will be added in brainliest!!
Answers
Answered by
0
Answer:
Write a C program to find the sum of first 10 natural numbers.
Pictorial Presentation:
Sample Solution:
C Code: #include <stdio.h> void main() { int j, sum = 0; printf("The first 10 natural number is :\n"); for (j = 1; j <= 10; j++) { sum = sum + j; printf("%d ",j); } printf("\nThe Sum is : %d\n", sum); } ...
Flowchart:
Explanation:
I hope that helps you
Attachments:
Similar questions