-
Lenguaje
Pascal
-
Descripción
Lea un importe bruto y calcule su importe neto, si es mayor de 15,000 se le aplicará un 16% de impuestos, en caso contrario se le aplicará un 10%.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
program ImporteNeto;
uses crt;
var importe_bruto, importe_neto, impuestos : real;
begin
write ('Ingresa el valor de importe bruto: ');
readln (importe_bruto);
if importe_bruto>15000 then
begin
impuestos := importe_bruto*0.16;
end
else
begin
impuestos := importe_bruto*0.1;
end;
importe_neto := importe_bruto+impuestos;
writeln ('Valor de importe neto: ', importe_neto:0:6);
writeln ('Valor de impuestos: ', impuestos:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var importe_bruto, importe_neto, impuestos : real;
begin
write ('Ingresa el valor de importe bruto: ');
readln (importe_bruto);
if importe_bruto>15000 then
begin
impuestos := importe_bruto*0.16;
end
else
begin
impuestos := importe_bruto*0.1;
end;
importe_neto := importe_bruto+impuestos;
writeln ('Valor de importe neto: ', importe_neto:0:6);
writeln ('Valor de impuestos: ', impuestos:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.