Pages

Tuesday 22 March 2011

PROGRAM TO PRINT SERIES

DESCRIPTION-:THIS PROGRAM PRINTS THE SERIES LIKE
N .......5 4 3 2 1 0 1 2 3 4 5........N.
PROGRAM-:   
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,n;
cout<<"enter the value of n";
cin>>n;
for(i=n;i>=0;i--)
{
cout<<i;
}
for(i=1;i<=n;i++)
{
cout<<i;
}
getch();
}

0 comments:

Post a Comment

 
Copyright (c) 2010 Concepts Of C++. Design by WPThemes Expert

Blogger Templates and RegistryBooster.