DESCRIPTION-:THIS PROGRAM PRINT THE SERIES AS
4 3 2 1
3 2 1
2 1
1
PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,n;
cout<<"enter the value of n";
cin>>n;
for(i=n;i>0;i--)
{
cout<<"\n";
for(j=i;j>0;j--)
{
cout<<j;
}
}
getch();
}
4 3 2 1
3 2 1
2 1
1
PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,n;
cout<<"enter the value of n";
cin>>n;
for(i=n;i>0;i--)
{
cout<<"\n";
for(j=i;j>0;j--)
{
cout<<j;
}
}
getch();
}
0 comments:
Post a Comment