CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,sum=0;
clrscr();
printf("sum of series upto: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
sum=sum+i;
}
printf("Sum of series= %d",sum);
getch();
}
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ3WNj_C7X3a6_K5ZyDvdvU7JW_fJMq8GoYYhQTc9YSICN4K0vD6Tt4rlI45j7co09h7MamNeupaJXxipS3D_joKyKOP3CNWUGz8v8GSvX0fX1vubKS8qF0xYx0jARedrvxnBr0IYCIPxU/s1600/1.jpg) |
CODING |
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9V99-YadNaQi5ubxeQ4HwE2C6n9Z3YYzYP6fdriL7QmBCVZaQ1s17HH2RGjO_X3LAVC7S0-hM1RTRUbEWFMGFbv5qDo2UTGLlheqkFGJ11h2igak8vGKUN9BGmTb_GwS8vdoPFu_pNBfb/s1600/2.jpg) |
OUTPUT |
For any query or suggestion please comment below...
No comments:
Post a Comment