Write a programe print the sum of series 0,1,2,.....10
Answer Posted / mrs.ahmer
#include<stdio.h>
#include<conio.h>
void main()
{
int c,sum;
clrscr();
c=0;
sum=0;
while(c<=10)
{
printf("%d\n",c);
sum=sum+c;
c=c+1;
}
printf("sum is %d",sum);
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is this infamous null pointer, anyway?
What is meant by inheritance?
How many bytes are occupied by near, far and huge pointers (dos)?
Write a program to implement queue.
What is void main () in c?
What are the functions to open and close the file in c language?
What does %d do in c?
what are the facialities provided by you after the selection of the student.
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
What does *p++ do? What does it point to?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What are different types of operators?
How will you divide two numbers in a MACRO?
Explain what is a stream?
Explain the advantages of using macro in c language?