-
Lenguaje
Pascal
-
Descripción
Calcule el costo total de acuerdo a su cantidad y al precio del producto considerando que se le debe de cobrar el IVA (el 16%).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
program CobroDeIvaDe16;
uses crt;
var IVA, cantidad, costo_total, precio, subtotal : real;
begin
write ('Ingresa el valor de cantidad: ');
readln (cantidad);
write ('Ingresa el valor de precio: ');
readln (precio);
subtotal := cantidad*precio;
IVA := subtotal*0.16;
costo_total := subtotal+IVA;
writeln ('Valor de IVA: ', IVA:0:6);
writeln ('Valor de costo total: ', costo_total:0:6);
writeln ('Valor de subtotal: ', subtotal:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var IVA, cantidad, costo_total, precio, subtotal : real;
begin
write ('Ingresa el valor de cantidad: ');
readln (cantidad);
write ('Ingresa el valor de precio: ');
readln (precio);
subtotal := cantidad*precio;
IVA := subtotal*0.16;
costo_total := subtotal+IVA;
writeln ('Valor de IVA: ', IVA:0:6);
writeln ('Valor de costo total: ', costo_total:0:6);
writeln ('Valor de subtotal: ', subtotal:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.