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
When would you use a pointer to a function?
What is the full form of getch?
How do you generate random numbers in C?
How do you define CONSTANT in C?
Explain how do you list files in a directory?
What are compound statements?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
What is main () in c?
Tell me when is a void pointer used?
What are the storage classes in C?
write a program to print data of 5 five students with structures?
Can a variable be both static and volatile in c?
What is string length in c?
Write a code of a general series where the next element is the sum of last k terms.
What is the explanation for prototype function in c?