-
Lenguaje
Pascal
-
Descripción
Calcular comisión por venta. Si el vendedor tiene ventas:
- > 200000 7% del total de ventas.
- < 199000 2% del total.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
program ComisionPorVenta;
uses crt;
var comision, venta : real;
begin
write ('Ingresa el valor de venta: ');
readln (venta);
if venta>=200000 then
begin
comision := venta*0.07;
end
else
begin
comision := venta*0.02;
end;
writeln ('Valor de comision: ', comision:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var comision, venta : real;
begin
write ('Ingresa el valor de venta: ');
readln (venta);
if venta>=200000 then
begin
comision := venta*0.07;
end
else
begin
comision := venta*0.02;
end;
writeln ('Valor de comision: ', comision:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.