int num = 1; for (int out = 1 ; out <= 3 ; out++) { for (int inn = 1 ; inn <= out ; inn++) { c.print (num); num = num + 1; } c.println (""); }