-
Lenguaje
Pascal
-
Descripción
El banco "Préstamo fácil" ha decidido aumentar el límite de crédito de las tarjetas de sus clientes. Para esto, se considera la siguiente información:
- Si tiene tarjeta tipo 1, el aumento será de 20%.
- Si tiene tipo 2, el aumento será de 30%.
- Si tiene tipo 3 el aumento será de 40%.
- Si tiene tipo 4 el aumento será de 45%.
- Para cualquier otro tipo, el aumento será de 50%.
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 AumentoDelLimiteDeCredito;
uses crt;
var aumento, limite_actual, nuevo_limite, tipo_de_tarjeta : real;
begin
write ('Ingresa el valor de limite actual: ');
readln (limite_actual);
write ('Ingresa el valor de tipo de tarjeta: ');
readln (tipo_de_tarjeta);
aumento := 50;
if tipo_de_tarjeta=1 then
begin
aumento := 20;
end;
if tipo_de_tarjeta=2 then
begin
aumento := 30;
end;
if tipo_de_tarjeta=3 then
begin
aumento := 40;
end;
if tipo_de_tarjeta=4 then
begin
aumento := 45;
end;
nuevo_limite := limite_actual+limite_actual*aumento/100;
writeln ('Valor de aumento: ', aumento:0:6);
writeln ('Valor de nuevo limite: ', nuevo_limite:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var aumento, limite_actual, nuevo_limite, tipo_de_tarjeta : real;
begin
write ('Ingresa el valor de limite actual: ');
readln (limite_actual);
write ('Ingresa el valor de tipo de tarjeta: ');
readln (tipo_de_tarjeta);
aumento := 50;
if tipo_de_tarjeta=1 then
begin
aumento := 20;
end;
if tipo_de_tarjeta=2 then
begin
aumento := 30;
end;
if tipo_de_tarjeta=3 then
begin
aumento := 40;
end;
if tipo_de_tarjeta=4 then
begin
aumento := 45;
end;
nuevo_limite := limite_actual+limite_actual*aumento/100;
writeln ('Valor de aumento: ', aumento:0:6);
writeln ('Valor de nuevo limite: ', nuevo_limite:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.