Guest User

Untitled

a guest
Jun 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. program merda;
  2. var
  3. begin
  4. for i:=1 to 2 do
  5. for j:=1 to 3 do
  6. begin
  7. writeln('Insira um numero');
  8. readln(num[i,j];
  9. while (num[i,j]<10) or (num[i,j]>30) do
  10. begin
  11. writeln('Apenas numeros entre 10 e 30, insira de novo');
  12. readln(num[i,j]);
  13. end;
  14. end;
  15.  
  16. soma:=0; max:=num[1,1]+num[2,1];
  17. for i:=1 to 3 do
  18. begin
  19. for j:=1 to 2 do
  20. soma:=soma+num[i,j];
  21. if soma>max then
  22. begin
  23. max:=soma;
  24. colu:=i;
  25. end;
  26. soma:=0;
  27.  
  28. end;
  29. writeln('A coluna com maior numero de documentos é ', colu);
  30. end.
Add Comment
Please, Sign In to add comment