Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Saltos.pas

879 views

Published on

24234

Published in: Data & Analytics
  • Be the first to comment

  • Be the first to like this

Saltos.pas

  1. 1. PROGRAM saltos; Uses CRT; VAR i, j, vencedor : INTEGER; marcas: ARRAY [1..3, 1..4] OF REAL; maximo: REAL; BEGIN CLRSCR; FOR j:= 1 TO 4 DO BEGIN WRITELN ('Ensaio Nº',j) FOR i:= 1 TO 3 DO BEGIN WRITE ('Registar a marca do atleta Nº', i); READLN (MARCAS[i,j]) END END; maximo := 0; FOR i:= 1 TO 3 DO FOR j := 1 TO 4 DO IF (marcas[i,j] > maximo) THEN BEGIN maximo := marcas [i,j]; vencedor := i END WRITELN ('O vencedor foi o atleta Nº', vencedor); WRITELN ('Alcançou a marca de', maximo:2:2, ' metros'); READLN END.

×