Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program gg;
- {Autor: }
- var alea,dis,v1,p1,v2,p2,v3,p3 : Real;
- hh,mm,ss,er : Integer;
- v: Real;
- tiempo: Real;
- begin
- readln(dis,v1,p1,v2,p2,v3,p3 );
- p1 := trunc(p1*10);
- p2 := trunc(p2*10);
- p3 := trunc(p3*10);
- randomize;
- alea := random();
- alea := 0.3;
- alea := trunc(alea*1000);
- er:= (trunc(p1)-1);
- v:= v1*ord(trunc(alea) in [0..er]) + v2*ord(trunc(alea) in [trunc(p1)..trunc(p1+p2)-1])+
- v3*ord(trunc(alea) in [trunc(p1+p2)..trunc(p1+p2+p3)-1]);
- v := v*18/5;
- tiempo := dis/v;
- hh := trunc(tiempo);
- mm := trunc(frac(tiempo))*60;
- ss := trunc(frac(frac(tiempo)*60)*60);
- writeln('Resultado: ', hh, ' hh ',mm,' mm ',ss,' ss .');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement