-
Lenguaje
Pascal
-
Descripción
Permita ingresar el monto de ventas alcanzada por un vendedor durante el mes corriente. Luego de calcular bonificación que le corresponde sabiendo que:
Monto | Bonificación(%)
0 - 1000 | 0
1000 - 5000 | 3
5000 - 20000 | 5
20000 - más | 8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
program BonificacionPorVentas;
uses crt;
var bonificacion, monto_de_ventas : real;
begin
write ('Ingresa el valor de monto de ventas: ');
readln (monto_de_ventas);
bonificacion := 0;
if (monto_de_ventas>=1000) and (monto_de_ventas<5000) then
begin
bonificacion := monto_de_ventas*0.03;
end;
if (monto_de_ventas>=5000) and (monto_de_ventas<20000) then
begin
bonificacion := monto_de_ventas*0.05;
end;
if monto_de_ventas>=20000 then
begin
bonificacion := monto_de_ventas*0.08;
end;
writeln ('Valor de bonificacion: ', bonificacion:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var bonificacion, monto_de_ventas : real;
begin
write ('Ingresa el valor de monto de ventas: ');
readln (monto_de_ventas);
bonificacion := 0;
if (monto_de_ventas>=1000) and (monto_de_ventas<5000) then
begin
bonificacion := monto_de_ventas*0.03;
end;
if (monto_de_ventas>=5000) and (monto_de_ventas<20000) then
begin
bonificacion := monto_de_ventas*0.05;
end;
if monto_de_ventas>=20000 then
begin
bonificacion := monto_de_ventas*0.08;
end;
writeln ('Valor de bonificacion: ', bonificacion:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.