Tuesday, April 2, 2013

C Language Example # 49 Series Example # 01

C Language Example # 49 Series Example # 01.

* This program is example of simple series.
* Program will display 1 to 10.

//Written by : Latest Technology Guide
//Title : C Language Example #   49 Series Example # 01.

 
#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();
}
Output:



--------------------------------------------------------------------------------
Explanation of C Programming Language Example # 49 Series Example # 01.

*  Program will display simple series from 1 to 10.


Note: All programs are developed and tested using Turbo C++ 3.0 under Windows XP. We just want to provide guidelines to the users. If you are using any other Compiler or other operating system they you need to modify this program as per your requirements.

No comments:

Post a Comment