milardovich

Parcial algoritmos UTN

May 19th, 2011
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.22 KB | None | 0 0
  1. {
  2. *   Parcial 1 Algoritmos - 12/05/2011 - Comisión 9 - UTN FRRO
  3. *   ------------------------------------------------------------------------
  4. *   Copyright (C) 2011, Sergio Milardovich <[email protected]>
  5. *   This program is Free Software.
  6. *
  7. *   @package    Pascal-Problems
  8. *   @license    http://www.gnu.org/copyleft/gpl.html GNU/GPL License 2.0
  9. *   @author     Sergio Milardovich <[email protected]>
  10. *   @link       http://www.milardovich.com.ar
  11. }
  12. {
  13. * Nota:
  14. * Se puede ver el enunciado acá:
  15. * http://a2.sphotos.ak.fbcdn.net/hphotos-ak-snc6/227914_1550258897020_1851540001_936362_4920073_n.jpg
  16. }
  17. Program parc1;
  18. Var
  19.     i,k,cant_ven: integer;
  20.     cod_art: char;
  21.     prec_unit,total: real;
  22. Begin
  23.     For i:= 1 to 100 do
  24.     Begin
  25.         total := 0;
  26.         For k := 1 to 5 do
  27.         Begin
  28.             Writeln('Ingrese el código del artículo: ');
  29.             Read(cod_art);
  30.             Writeln('Ingrese la cantidad vendida de dicho artículo: ');
  31.             Read(cant_ven);
  32.             Writeln('Ingrese el precio unitario: ');
  33.             Read(prec_unit);
  34.             Writeln('Cod art: '+cod_art,'\n Cant ven: ',cant_ven,'\n Precio unitario: ',prec_unit, '\n\n');
  35.             total := total + (prec_unit*cant_ven);
  36.         End;
  37.         If total > 200 then
  38.             total := total - (total*0.1);
  39.         Writeln('El total es: ',total);
  40.     End;
  41. End.
Advertisement
Add Comment
Please, Sign In to add comment