#include<stdio.h> int main() { int i,sum=0; for(i=1;i<=10;i++) { printf("\nNo = %d",i); sum=sum+i; } printf("\nSum of 10 natural numbers is = %d",sum); return 0; }
OUTPUT
No = 1
No = 2
No = 3
No = 4
No = 5
No = 6
No = 7
No = 8
No = 9
No = 10
Sum of 10 natural numbers is = 55
Please Login to Post the answer