c series programs

      Comments Off on c series programs

c series programs

c series programs

c series programs is collection of 28 programs on c programming fundamental of series. Series in C Language is most popular in many entrance examination which can help you to crack competition exams also. Here i have prepared many different C Series programs which might be useful to you. Don’t forget to share your feedback regarding my articles.

Have you checked, C Array Tutorial?

c series programs Sample 1

//Written by Adarsh Patel


#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int sum=0,n,i;

printf("Enter Number of Terms :");
scanf("%d",&n);

for(i=1;i<=n;i++)
{
printf(" %3d ",i);
}


getch();
}

 

c series programs Sample 2

//Written by Adarsh Patel

#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int sum=1,n,i;

printf("Enter Number of Terms :");
scanf("%d",&n);

printf("\n\n ****** 1st Method  **********\n\n");
for(i=1;i<=n;i=i+2)
{
printf(" %3d ",i);
}
printf("\n\n ****** 2nd Method  **********\n\n");
for(i=1;i<=n;i++)
{
	sum = sum + 2;
	printf(" %3d ",sum);
}


getch();
}

 

c series programs Sample 3

//Written by Adarsh Patel


#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int n,i;
float sum=0.0,ans=0.0;

printf("Enter Number of Terms :");
scanf("%d",&n);

for(i=1;i<=n;i++)
{
sum=sum+0.5;
ans=ans+sum;
printf(" %.2f +",sum);
}

printf("\b\b");
printf("  =  Answer is :%.2f",ans);

getch();
}

 

c series programs Sample 4

//Written by Adarsh Patel


#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int n,i;
float sum=0.0,ans=0.0;

printf("Enter Number of Terms :");
scanf("%d",&n);

for(i=1;i<=n;i++)
{
sum=sum+0.5;
ans=ans+sum;
printf(" %.2f +",sum);
}

printf("\b\b");
printf("  =  Answer is :%.2f",ans);

getch();
}

 

c series programs Sample 5

//Written by Adarsh Patel


#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int n,i,sum=0;

printf("Enter Number of Terms :");
scanf("%d",&n);

for(i=5;i<=n*5;i=i+5)
{
sum=sum+i;
printf(" %d +",i);
}

printf("\b\b");
printf("  =  Answer is :%d",sum);

getch();
}

 

c series programs Sample 6

//Written by Adarsh Patel


#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int n,j=1,k=2,i,sum=0,ans=0;

printf("Enter Number of Terms :");
scanf("%d",&n);

for(i=1;i<=n;i++)
{
sum=j+k;
ans=ans+sum;
printf(" %d +",sum);
j=j+2;
k=k+2;
}

printf("\b\b");
printf("  =  Answer is :%d",ans);

getch();
}

 

c series programs Sample 7

//Written by Adarsh Patel


#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int n,j=1,k=2,i,sum=0,ans=0;

printf("Enter Number of Terms :");
scanf("%d",&n);

for(i=1;i<=n;i++)
{
sum=j+k;
ans=ans+sum;
printf(" %d +",sum);
j=j+2;
k=k+2;
}

printf("\b\b");
printf("  =  Answer is :%d",ans);

getch();
}

 

 

c series programs All Download

[sociallocker]Download[/sociallocker]