fork download
  1. class pat3
  2. {
  3. public static void main (String[] args)
  4. {
  5. int row;
  6. int val;
  7.  
  8. for(row=1;row<=5;row++)
  9. {
  10. for(val=0;val<row;val++)
  11. {
  12. System.out.print((row + 2*val) + "\t");
  13. }
  14.  
  15. System.out.println();
  16. }
  17. }
  18. }
Success #stdin #stdout 0.07s 381248KB
stdin
Standard input is empty
stdout
1	
2	4	
3	5	7	
4	6	8	10	
5	7	9	11	13