#include<iostream.h>
#include<conio.h>
void lower_half(int a[10][10],int r);
void main()
{
clrscr();
int a[10][10],i,j,r,c;
cout<<"enter row and column";
cout<<"\n\n";
cin>>r;
cout<<"\n\n";
cin>>c;
cout<<"\n\n";
cout<<"enter elements";
cout<<"\n\n";
for(i=0;i<r;i++)
{
cout<<"\n";
for(j=0;j<c;j++)
{
cin>>a[i][j];
}
}
lower_half(a,r);
getch();
}
void lower_half(int a[10][10],int r)
{
int i,j;
cout<<"\n";
for(i=0;i<r;i++)
{
for(j=0;j<=i;j++)
{
cout<<a[i][j]<<" ";
}
cout<<"\n";
}
}
#include<conio.h>
void lower_half(int a[10][10],int r);
void main()
{
clrscr();
int a[10][10],i,j,r,c;
cout<<"enter row and column";
cout<<"\n\n";
cin>>r;
cout<<"\n\n";
cin>>c;
cout<<"\n\n";
cout<<"enter elements";
cout<<"\n\n";
for(i=0;i<r;i++)
{
cout<<"\n";
for(j=0;j<c;j++)
{
cin>>a[i][j];
}
}
lower_half(a,r);
getch();
}
void lower_half(int a[10][10],int r)
{
int i,j;
cout<<"\n";
for(i=0;i<r;i++)
{
for(j=0;j<=i;j++)
{
cout<<a[i][j]<<" ";
}
cout<<"\n";
}
}