Advertisement
henriqueforino

LISTA02_EX14 2014/02

Sep 30th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.75 KB | None | 0 0
  1. //ALUNO: Luiz Henrique Forino
  2. //PROGRAMAÇÃO I, PROFESSOR PX
  3. //2014/02
  4.  
  5. Program EX07_LISTA02 ;
  6.  
  7. var x, y, total :real;  //y para quantidade,  
  8. var w :integer;
  9. Begin
  10.   writeln ('Digite o código do produto: ');
  11.   readln (w);
  12.   writeln ('Digite a quatntidade que foi comprada: ');
  13.   readln (y);
  14.  
  15.   case w of
  16.   1001 : begin x := (5.32*y);
  17.    
  18.       writeln ('Valor da dívida: ', x, '.')
  19.     end;
  20.   1324 : begin x := (6.45*y);
  21.    
  22.     writeln ('Valor da dívida: ', x, '.');
  23.     end;
  24.   6548 : begin x := (2.37*y);
  25.    
  26.     writeln ('Valor da dívida: ', x, '.');
  27.     end;
  28.   7623 : begin x := (6.45*y);
  29.      
  30.     writeln ('Valor da dívida: ', x, '.');
  31.     end;
  32.      
  33.   else writeln ('Código não identificado.');
  34.   readkey;
  35.   end;
  36. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement