#include<iostream.h>
#include<conio.h>
void arrange(int r,int c);
void main()
{
clrscr();
int r,c,i,j;
cout<<"\n\n";
cout<<"enter row and column";
cout<<"\n\n";
cin>>r;
cout<<"\n\n";
cin>>c;
cout<<"\n\n";
arrange(r,c);
getch();
}
void arrange(int r,int c)
{
int a[5][5],i,j,v;
for(i=0;i<r;i++)
{
v=1;
for(j=0;j<c;j++)
{
if(j<=i)
{
cout<<v<<"\t";
v++;
}
else
{
cout<<"0"<<"\t";
}
}
cout<<"\n";
}
}
#include<conio.h>
void arrange(int r,int c);
void main()
{
clrscr();
int r,c,i,j;
cout<<"\n\n";
cout<<"enter row and column";
cout<<"\n\n";
cin>>r;
cout<<"\n\n";
cin>>c;
cout<<"\n\n";
arrange(r,c);
getch();
}
void arrange(int r,int c)
{
int a[5][5],i,j,v;
for(i=0;i<r;i++)
{
v=1;
for(j=0;j<c;j++)
{
if(j<=i)
{
cout<<v<<"\t";
v++;
}
else
{
cout<<"0"<<"\t";
}
}
cout<<"\n";
}
}