Calculate First 10 Integer Numbers Sum Using Loops
Answer:
#include<stdio.h>
int main()
{ int n=10,sum=0,i=1;
while(i<=n){
sum += i ;
++i;
}
printf("%d", sum);
return 0;
}
Now just submit the code and check the result.
Comments
Post a Comment