Miscellany
public text v1 · immutablewrite a C++ program which give the following output :
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
sol :
#include<iostream.h>
main()
{
int i , j ;
for ( i=1 ; i<5 ; ++i )
{
for (j=1; j<i ; j++)
cout<<i<<"\t";
cout<<"\n";
}
return (0);
}