write a C program to print sum of n number from 1 to 10 (use for loop)
Answers
Answered by
0
Answer:
C For Loop: Exercise-2 with Solution
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:
C Programming Code Editor:
Similar questions