-
Lenguaje
Pascal
-
Descripción
El banco ha decidido aumentar el límite de crédito de las tarjetas de crédito de sus clientes, para esto considera que si su cliente tiene tarjeta tipo 1, el aumento será de 25 %; si tiene tipo 2, será de 35 %; si tiene tipo 3, de 40 %, y para cualquier otro tipo, de 50 %. Ahora bien, si la persona cuenta con más de una tarjeta, sólo se considera la de tipo mayor o la que el cliente indique. Determinar el nuevo límite de crédito que tendrá una persona en su tarjeta.
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 AumentoAlLimiteDeCredito;
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 := 0;
if tipo_de_tarjeta=1 then
begin
aumento := limite_actual*0.25;
end;
if tipo_de_tarjeta=2 then
begin
aumento := limite_actual*0.35;
end;
if tipo_de_tarjeta=3 then
begin
aumento := limite_actual*0.4;
end;
if (tipo_de_tarjeta<>1) and (tipo_de_tarjeta<>2) and (tipo_de_tarjeta<>3) then
begin
aumento := limite_actual*0.5;
end;
nuevo_limite := limite_actual+aumento;
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 := 0;
if tipo_de_tarjeta=1 then
begin
aumento := limite_actual*0.25;
end;
if tipo_de_tarjeta=2 then
begin
aumento := limite_actual*0.35;
end;
if tipo_de_tarjeta=3 then
begin
aumento := limite_actual*0.4;
end;
if (tipo_de_tarjeta<>1) and (tipo_de_tarjeta<>2) and (tipo_de_tarjeta<>3) then
begin
aumento := limite_actual*0.5;
end;
nuevo_limite := limite_actual+aumento;
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.