Write a program to calculate sum of first 10 odd numbers.

This answer is restricted. Please login to view the answer of this question.

Login Now

int main(){

    int i, sum=0;

    for(int i = 1; i < 20; i = i+2) 
      sum += i;

    printf("sum=%d", sum);


The output of above program is


If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

  Loading . . .