-
Lenguaje
Pascal
-
Descripción
Se les dará un bono por antigüedad a los empleados de una tienda. Si tiene 5 años, se les dará $1000; si tienen más de 5 y menos de 10 años $2000. Para los que tengan 10 o más, el bono será de $3000. Determinar el bono que recibirá un trabajador.
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 BonoPorAntiguedadDe5O10Anos;
uses crt;
var antiguedad, bono : integer;
begin
write ('Ingresa el valor de antiguedad: ');
readln (antiguedad);
bono := 0;
if antiguedad=5 then
begin
bono := 1000;
end;
if (antiguedad>5) and (antiguedad<10) then
begin
bono := 2000;
end;
if antiguedad>=10 then
begin
bono := 3000;
end;
writeln ('Valor de bono: ', bono);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var antiguedad, bono : integer;
begin
write ('Ingresa el valor de antiguedad: ');
readln (antiguedad);
bono := 0;
if antiguedad=5 then
begin
bono := 1000;
end;
if (antiguedad>5) and (antiguedad<10) then
begin
bono := 2000;
end;
if antiguedad>=10 then
begin
bono := 3000;
end;
writeln ('Valor de bono: ', bono);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.