
import java.applet.Applet;
import java.awt.*;

public class prog2 extends Applet{
	int[] y={2,8,5,10,9,13,8,3,10,6};
	int x0,y0,x1,y1;

	public void init(){
		setBackground(Color.lightGray);
		setForeground(Color.black);
	}

	public void paint(Graphics g){
		int x;
		for(x=0; x<10; x++){
			g.setColor(Color.red);
			x0=(x+1)*10;	y0=200-y[x]*10;
			x1=x0+10;	y1=200-y[x+1]*10;
			g.fillOval(x0-2,y0-2,4,4);
			g.drawLine(x0,y0,x1,y1);
		}
	}
}
