Pages

Friday 18 March 2011

PROGRAM TO PRINT SERIES

DESCRIPTION-:THIS PROGRAM PRINT THE SERIES AS
1
2 1
3 2 1
4 3 2 1 


PROGRAM-: 
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,n;
cout<<"enterthe value of n";
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"\n";
for(j=i;j>=0;j--)
{
cout<<j;
}
}
getch();
}

0 comments:

Post a Comment

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

Blogger Templates and RegistryBooster.