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

Answer Posted / manjushree

Answer #2 doesnot count for integer 10.

int main()
{
int i,temp=0;
printf("sum of series is:");
for(i=0;i<10;i++)
temp+=i;
printf("%d",temp);
getch();
}

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between struct and union in C?

568


Write a C program to count the number of email on text

1412


What is logical error?

603


What is file in c preprocessor?

648


Is a house a mass structure?

638






What tq means in chat?

579


What are local variables c?

547


How can I make sure that my program is the only one accessing a file?

674


What is NULL pointer?

671


What is pointer to pointer in c?

632


Explain 'bus error'?

555


Write a program to implement queue.

661


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

647


What is a MAC Address?

624


How can you read a directory in a C program?

647