• Lenguaje

    Pascal

  • Descripción

    Leer un monto a pagar y aplicar el 18% de IGV y luego un descuento de 4%.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
program IgvDel18;
uses crt;

var IGV, descuento, monto_a_pagar, subtotal, total : real;
begin
    write ('Ingresa el valor de monto a pagar: ');
    readln (monto_a_pagar);
    IGV := monto_a_pagar*0.15;
    subtotal := monto_a_pagar+IGV;
    descuento := subtotal*0.04;
    total := subtotal-descuento;
    writeln ('Valor de IGV: ', IGV:0:6);
    writeln ('Valor de descuento: ', descuento:0:6);
    writeln ('Valor de subtotal: ', subtotal:0:6);
    writeln ('Valor de total: ', total:0:6);
    writeln;
    write ('Presiona una tecla para terminar . . . ');
    readkey;
end.