program linija1; uses crt,graph; var driver,mode,y:integer; begin ClrScr; writeln(' Ovaj program prikazuje horizontalnu liniju'); writeln; write(' Unesite Y-ordinatu neke tacke linije: '); readln(y); driver:=detect; initgraph(driver,mode,''); if (y>GetMaxY) or (y<0) then begin restorecrtmode; write('Y mora biti u intervalu [0,',GetMaxY,']'); readln end else begin Line(0,y,GetMaxX,y); readln; closegraph; end end. |
|