All pastes #677057 Raw Edit

Miscellany

public text v1 · immutable
#677057 ·published 2007-08-31 17:02 UTC
rendered paste body
write 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);
}