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
please send me the code for multiplying sparse matrix using c
What is the heap?
How do you declare a variable that will hold string values?
If null and 0 are equivalent as null pointer constants, which should I use?
What is difference between stdio h and conio h?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
What is action and transformation in spark?
What are pragmas and what are they good for?
What are Macros? What are its advantages and disadvantages?
What is the main difference between calloc () and malloc ()?
What are bitwise shift operators in c programming?
What are the functions to open and close the file in c language?
What is the process to generate random numbers in c programming language?
Simplify the program segment if X = B then C ← true else C ← false
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none