-
Lenguaje
Pascal
-
Descripción
La junta directiva de una empresa hotelera, autorizó el aumento de los sueldos de sus empleados, teniendo en cuenta que quienes ganan hasta 700.000 se les incrementará el 10%, quienes ganan hasta 1.000.000 se les incrementará el 7% y quienes ganan hasta 1.500.000 se incrementará el 5%. Se requiere una aplicación que permita calcular los nuevos sueldos.
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
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
program AumentoDeLosSueldosDeUnaHotelera;
uses crt;
var incremento, nuevo_sueldo, sueldo_anterior : real;
begin
write ('Ingresa el valor de sueldo anterior: ');
readln (sueldo_anterior);
incremento := 0;
if sueldo_anterior<=700000 then
begin
incremento := sueldo_anterior*0.1;
end;
if (sueldo_anterior>700000) and (sueldo_anterior<=1000000) then
begin
incremento := sueldo_anterior*0.07;
end;
if (sueldo_anterior>1000000) and (sueldo_anterior<=1500000) then
begin
incremento := sueldo_anterior*0.05;
end;
nuevo_sueldo := sueldo_anterior+incremento;
writeln ('Valor de incremento: ', incremento:0:6);
writeln ('Valor de nuevo sueldo: ', nuevo_sueldo:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var incremento, nuevo_sueldo, sueldo_anterior : real;
begin
write ('Ingresa el valor de sueldo anterior: ');
readln (sueldo_anterior);
incremento := 0;
if sueldo_anterior<=700000 then
begin
incremento := sueldo_anterior*0.1;
end;
if (sueldo_anterior>700000) and (sueldo_anterior<=1000000) then
begin
incremento := sueldo_anterior*0.07;
end;
if (sueldo_anterior>1000000) and (sueldo_anterior<=1500000) then
begin
incremento := sueldo_anterior*0.05;
end;
nuevo_sueldo := sueldo_anterior+incremento;
writeln ('Valor de incremento: ', incremento:0:6);
writeln ('Valor de nuevo sueldo: ', nuevo_sueldo:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.