JAVA CODE
//Ex8_7 program import java.applet.Applet; import java.awt.Graphics; public class Ex8_7 extends Applet { public void paint (Graphics g) { int h, i, j; for(h=1; h<=2; h++) { for (i=1; i<=5; i++) for (j=1; j<=i; j++) g.drawString ("s", 10*j, 10*i+50*h); } } }