program upe; uses crt; { naudojam papildomas bibliotekas} var m, n, h : longint; x : real; y : real; begin WriteLn('ivedam per valanda nuplaukta kelia myliom'); readln(m); WriteLn('ivedam upes tekmes greiti'); readln(n); WriteLn('ivedam laika'); readln(h); if (m <= 0) or (n <= 0) or (h <= 0) then begin {jei duoda nuli neskaiciuojam} writeln('Klaida duomenyse. Atsakymas negalimas'); delay (2000); end else if (m>0) or (n>0) or (h>0) then begin x := (m-n)*h; y := (m+n)*h; textcolor (2); WriteLn('Pries srove atstumas:' ,x:4:2, 'km'); textcolor (3); WriteLn('Palei srove atstumas:' ,y:4:2, 'km'); delay (2000); {palaikom kol pamato atsakyma} end end.