Ir ao conteúdo
  • Cadastre-se

Rocha2106

Membro Júnior
  • Posts

    1
  • Cadastrado em

  • Última visita

Reputação

1
  1. Gostaria de ajuda, onde está o erro na hora da compilação, quem ajudar humilde Program Pzim ; var mat,m2: array [1..5,1..4] of integer; i,j,num,r,tot,cimpar,cpar,limpar,lpar: integer; Begin lpar:= 2; cpar:= 1; limpar:= 1; cimpar:= 1; tot:= 0; repeat if tot <> 20 then begin read(num); r:=num/2; if r = 0 then begin if lpar > 4 then writeln('Não tem vagas para números pares')else begin mat[lpar,cpar]:=num; cpar:=cpar + 1; if cpar > 4 then begin lpar:=lpar + 2; cpar:= 1 end; end; end else begin if limpar > 5 then writeln ( 'Sem espaço para números ímpares') else begin mat[limpar,cimpar]:=num; cimpar:=cimpar + 1; if cimpar > 4 then begin limpar:=limpar + 2; cimpar:= 1 end; end; end; tot:=tot + 1; end; repeat until tot = 20; writeln('Matriz totalmente preenchida'); for i:= 1 to 5 do begin for j:= 1 to 4 do begin writeln( ', mat[i,j],'); end; end; readkey; End.

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...