-
Lenguaje
Pascal
-
Descripción
Calcular el bono de desarrollo de una persona teniendo en cuenta que:
- La persona debe ser de la tercera edad.
- Los ingresos de dicha persona no deben ser superiores a $395.
- Si la edad está comprendida entre 63 y 67 años, recibe $10.
- Si la edad está comprendida entre 68 y 72 años, recibe $15.
- Si la edad es mayor a 73 años, recibe $20.
Se debe ingresar por teclado la edad y el sueldo y mostrar por pantalla el bono a recibir.
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 BonoDeDesarrollo;
uses crt;
var bono, edad, sueldo : real;
begin
write ('Ingresa el valor de edad: ');
readln (edad);
write ('Ingresa el valor de sueldo: ');
readln (sueldo);
bono := 0;
if (sueldo>395) and (edad>=63) and (edad<68) then
begin
bono := 10;
end;
if (sueldo>395) and (edad>=68) and (edad<73) then
begin
bono := 15;
end;
if (sueldo>395) and (edad>=73) then
begin
bono := 20;
end;
writeln ('Valor de bono: ', bono:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var bono, edad, sueldo : real;
begin
write ('Ingresa el valor de edad: ');
readln (edad);
write ('Ingresa el valor de sueldo: ');
readln (sueldo);
bono := 0;
if (sueldo>395) and (edad>=63) and (edad<68) then
begin
bono := 10;
end;
if (sueldo>395) and (edad>=68) and (edad<73) then
begin
bono := 15;
end;
if (sueldo>395) and (edad>=73) then
begin
bono := 20;
end;
writeln ('Valor de bono: ', bono:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.