#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,sum=0;
clrscr();
printf(“enter the how many terms\n”);
scanf(“%d”,&n);
i=1;
do
{
printf(“%4d”,i);
sum=sum+i;
i++;
}
while(i<=n);
printf(“\n\nsum=%d\n”,sum);
getch();
}
Latest posts by Mohit Arora (see all)
- MongoDB Operators Tutorial – What are Different Operators Available? - October 5, 2019
- MongoDB Projection Tutorial : Return Specific Fields From Query - March 9, 2019
- MongoDB Index Tutorial – Create Index & MongoDB Index Types - July 6, 2018