• Lenguaje

    Pascal

  • Descripción

    Algoritmo que permita realizar ventas al crédito, se ingresará el importe de la venta y el número de cuotas. Calcular y visualizar la inicial que es el 15%, monto financiado, importe de intereses, importe de cuota y total a pagar.

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
program VentasAlCredito;
uses crt;

var cuota_inicial, importe_de_cuota, importe_de_intereses, importe_de_la_venta, monto_financiado : real;
var numero_de_cuotas, tasa_de_interes, total_a_pagar : real;
begin
    write ('Ingresa el valor de importe de la venta: ');
    readln (importe_de_la_venta);
    write ('Ingresa el valor de numero de cuotas: ');
    readln (numero_de_cuotas);
    write ('Ingresa el valor de tasa de interes: ');
    readln (tasa_de_interes);
    cuota_inicial := importe_de_la_venta*0.15;
    monto_financiado := importe_de_la_venta-cuota_inicial;
    importe_de_intereses := monto_financiado*tasa_de_interes/100;
    importe_de_cuota := (monto_financiado+importe_de_intereses)/numero_de_cuotas;
    total_a_pagar := cuota_inicial+monto_financiado+importe_de_intereses;
    writeln ('Valor de cuota inicial: ', cuota_inicial:0:6);
    writeln ('Valor de importe de cuota: ', importe_de_cuota:0:6);
    writeln ('Valor de importe de intereses: ', importe_de_intereses:0:6);
    writeln ('Valor de monto financiado: ', monto_financiado:0:6);
    writeln ('Valor de total a pagar: ', total_a_pagar:0:6);
    writeln;
    write ('Presiona una tecla para terminar . . . ');
    readkey;
end.