-
Lenguaje
Pascal
-
Descripción
El aumento que recibirá un trabajador será un porcentaje de su sueldo y depende de los años de antigüedad, como se muestra en la tabla.
Años de antigüedad | Aumento (%)
Más de 20 | 15
Más de 10 hasta 20 | 25
Más de 5 hasta 10 | 32
Hasta 5 | 43
El pago total que recibirá un trabajador, se obtiene de su sueldo más su aumento.
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
28
29
30
31
32
33
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
28
29
30
31
32
33
program AumentoPorTablaDeAntiguedad;
uses crt;
var antiguedad, aumento, pago_total, sueldo : real;
begin
write ('Ingresa el valor de antiguedad: ');
readln (antiguedad);
write ('Ingresa el valor de sueldo: ');
readln (sueldo);
aumento := 0;
if antiguedad>20 then
begin
aumento := sueldo*0.15;
end;
if (antiguedad>10) and (antiguedad<=20) then
begin
aumento := sueldo*0.25;
end;
if (antiguedad>5) and (antiguedad<=10) then
begin
aumento := sueldo*0.32;
end;
if antiguedad<=5 then
begin
aumento := sueldo*0.43;
end;
pago_total := sueldo+aumento;
writeln ('Valor de aumento: ', aumento:0:6);
writeln ('Valor de pago total: ', pago_total:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var antiguedad, aumento, pago_total, sueldo : real;
begin
write ('Ingresa el valor de antiguedad: ');
readln (antiguedad);
write ('Ingresa el valor de sueldo: ');
readln (sueldo);
aumento := 0;
if antiguedad>20 then
begin
aumento := sueldo*0.15;
end;
if (antiguedad>10) and (antiguedad<=20) then
begin
aumento := sueldo*0.25;
end;
if (antiguedad>5) and (antiguedad<=10) then
begin
aumento := sueldo*0.32;
end;
if antiguedad<=5 then
begin
aumento := sueldo*0.43;
end;
pago_total := sueldo+aumento;
writeln ('Valor de aumento: ', aumento:0:6);
writeln ('Valor de pago total: ', pago_total:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.