Jono007

Exercicios de revisão pascal

Oct 2nd, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 2.55 KB | None | 0 0
  1. //Exercicio revisão 1
  2.  
  3. Program Pzim ;
  4. var altura : real;
  5. var nome : string;
  6. Begin
  7.  
  8.          writeln('Insira o nome do atleta');
  9.          read(nome);
  10.          writeln('Insira a altura do atleta');
  11.          read(altura);
  12.          
  13.          writeln('O nome do atleta é ', nome);
  14.          
  15.          if (altura>=1.85) then
  16.          
  17.          writeln('O atleta disputará o BASQUETE')
  18.          
  19.          else
  20.          
  21.          writeln('O Atleta disputará o FUTEBOL');
  22.          
  23.                                                        
  24.  
  25.  
  26. End.
  27.  
  28.  
  29. //Exercicio revisão 2
  30.  
  31. Program Pzim ;
  32. var salario,ajuste,reajuste : real;
  33. var nome : string;
  34. Begin
  35.  
  36.          writeln('Insira o nome do jogador');
  37.          read(nome);
  38.          writeln('Insira o salário do jogador');
  39.          read(salario);
  40.          
  41.          writeln('O nome do atleta é ', nome);
  42.          
  43.          begin
  44.                      if (salario>=3000) then
  45.                                     begin
  46.                                         reajuste:=(salario*0.1)+salario;
  47.                                         ajuste:=salario*0.1;
  48.                                                 writeln('O Valor do reajuste é ', ajuste);
  49.                                                 writeln('O Salário com reajuste é ',reajuste);
  50.                                     end
  51.                                                
  52.          
  53.                      else
  54.                                     begin
  55.                                         reajuste:=(salario*0.05)+salario;
  56.                                         ajuste:=salario*0.05;
  57.                                                 writeln('O Valor do reajuste é ', ajuste);
  58.                                                 writeln('O Salário com reajuste é ',reajuste);
  59.                                     end
  60.          end     
  61.                                                        
  62.  
  63.  
  64. End.
  65.  
  66. //exercicio revisão 3
  67. Program Pzim ;
  68. var valor,ajuste:real;
  69. var tipo:string;
  70. Begin
  71.          writeln('Insira o tipo da pipoca');
  72.          read(tipo);
  73.          writeln('insira o valor da pipoca');
  74.          read(valor);
  75.          writeln('____- VALOR ORIGINAL-____');       
  76.          writeln('                         ');
  77.          writeln('1.PIPOCA - ',tipo,'      ');
  78.          writeln('VALOR-R$ ', valor,'      ');
  79.          writeln('-------------------------');
  80.          writeln('                         ');
  81.          writeln('                         ');
  82.          writeln('                         ');
  83.                  
  84.          if (tipo='doce') then
  85.                         begin                    
  86.                                  ajuste:=(valor*0.15)+valor;
  87.                                  writeln('___- VALOR REAJUSTADO-___');       
  88.                                  writeln('                         ');
  89.                                  writeln('1.PIPOCA - ' ,tipo,'     ');
  90.                                  writeln('VALOR - R$ ', ajuste,'   ');
  91.                                  writeln('-------------------------');                                           
  92.                 end
  93.                
  94.           else
  95.          
  96.           begin
  97.                                  ajuste:=(valor*0.10)+valor;
  98.                                  writeln('___- VALOR REAJUSTADO-___');           
  99.                                  writeln('                         ');
  100.                                  writeln('1.PIPOCA - ' ,tipo,'     ');
  101.                                  writeln('VALOR - R$ ', ajuste,'   ');
  102.                                  writeln('-------------------------');
  103.                                  
  104.              end
  105.                      
  106.  
  107. End.
Add Comment
Please, Sign In to add comment