Advertisement
Jono007

Exercicios Pascal FOR

Oct 30th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 2.07 KB | None | 0 0
  1. //exercicio 1
  2.  
  3.  
  4. Program pzin;
  5. Var n : string;
  6.     a : Real;
  7.     contador : integer;
  8. Begin
  9.     FOR contador := 1 to 3 do
  10.     Begin
  11.         writeln('Digite o nome do jogador');
  12.         read(n);
  13.         writeln('Digite a altura do jogador');
  14.         read(a);
  15.         if (a>=1.95) then
  16.         writeln('VOCÊ JOGARÁ BASQUETE')
  17.         else
  18.         writeln('VOCÊ JOGARÁ VOLEI');
  19.    
  20.         writeln('JOGADOR: ',n);
  21.  
  22.      End;
  23. End.
  24.  
  25. //exercicio 2
  26.  
  27.  
  28.  
  29. Program pzin;
  30. Var n : string;
  31.     s, total: Real;
  32.     contador : integer;
  33. Begin
  34.     FOR contador := 1 to 3 do
  35.     Begin
  36.         writeln('Digite o nome do Funcionário');
  37.         read(n);
  38.         writeln('Digite o salário do funcionário');
  39.         read(s);
  40.        
  41.         if (s>=2000.00) then
  42.         total:=s+(s*10/100)
  43.         else
  44.         total:=s+(s*20/100);
  45.            
  46.         writeln('Nome do Funcionário: ',n);
  47.         writeln('Salário Reajustado: R$', total);
  48.  
  49.      End;
  50. End.
  51.  
  52. //exercicio 3
  53.  
  54.  
  55. Program pzin;
  56. Var n : string;
  57.     s, total: Real;
  58.     contador : integer;
  59. Begin
  60.     FOR contador := 1 to 3 do
  61.     Begin
  62.         writeln('Digite o nome do Funcionário');
  63.         read(n);
  64.         writeln('Digite o salário do funcionário');
  65.         read(s);
  66.        
  67.         if (s>=2000.00) then
  68.         total:=s+100
  69.         else
  70.         total:=s+200;
  71.            
  72.         writeln('Nome do Funcionário: ',n);
  73.         writeln('Salário Reajustado: R$', total:0:2);
  74.  
  75.      End;
  76. End.
  77.  
  78. //exercicio 4
  79.  
  80. Program pzin;
  81. Var l,contador : integer;
  82. Begin
  83.     FOR contador := 1 to 3 do
  84.     Begin
  85.         writeln('Digite a quantidade de lados da forma geométrica');
  86.         read(l);
  87.        
  88.         if (l=3) then
  89.         writeln('Isso é um triangulo')
  90.         else
  91.         if (l=4)then
  92.         writeln('Isso é um quadrado')
  93.         else
  94.         writeln('Forma Geométrica não definida');
  95.  
  96.      End;
  97. End.
  98.  
  99. //exercicio 5
  100.  
  101. //exercicio 3
  102. Program pzin;
  103. Var contador : integer;
  104. Var n : string;
  105.     s,total : real;
  106. Begin
  107.     FOR contador := 1 to 3 do
  108.     Begin
  109.         writeln('Digite o nome do Funcionário');
  110.         read(n);
  111.         writeln('Digite o Salário');
  112.         read(s);
  113.        
  114.         if (s>=3000.00) then
  115.         total:=s+(s*10/100)-(s*5/100)
  116.         else
  117.         total:=s+(s*20/100)-(s*5/100);
  118.         writeln('O nome do funcionário é', n);
  119.         writeln('O novo salário é', total);
  120.      End;
  121. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement