Write a programe print the sum of series 0,1,2,.....10

Answer Posted / athiyaman

#include<stdio.h>
void main()
{
int i,sum=0;
for(i=0;i<=10;i++)
sum=sum+i;
printf("sum=%d",sum);
}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between abs() and fabs() functions?

615


Can you please explain the difference between syntax vs logical error?

703


What is main () in c language?

608


What is boolean in c?

621


How to find a missed value, if you want to store 100 values in a 99 sized array?

825






What is the modulus operator?

746


What is the explanation for modular programming?

694


What is strcpy() function?

664


What is array in C

719


Why clrscr is used after variable declaration?

1051


Explain bit masking in c?

646


How do you define CONSTANT in C?

663


What is 1d array in c?

608


What is the use of structure padding in c?

572


What is the use of pointers in C?

631