Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  begin5
Language: PASCAL
Code:
program Begin5;
var
T,V1,V2,S,Dist:real
begin
  writeln('Input speed 1');
  Readln(V1);
  writeln('Input speed 2');
  Readln(V2);
  writeln('Input way length');
  Readln(S);
  writeln('Input time');
  Readln(T);
  Dist:=S-(V1+V2)*T;
  if (Dist<0) Dist:=Dist*(-1);
  writeln('Distance is ',Dist,' km');
  Readln(T);
end.          
Comments: