Jump to content
Fórum Script Brasil
  • 0

(Resolvido) [PASCAL] Calculo de IOF e Juros


Question

Olá,

Preciso executar uma aplicação que calcule o valor de IOF(+7,8%) sobre um valor à determinar.

Após isto, preciso elencar as parcelas sendo que:

em 1x não há juros

em 2x há 1,7% sobre o valor da de (1x)

em 3x há 1,7% sobre o valor da de (2x)

.

.

.

.

até 9x

Por Exemplo:

Valor liquido: R$ 900,00

IOF:+7,8%

Valor total: R$ 970,20

1x 970,20

2x 493,34 = 986,69

3x 334,49 = 1003,46

. . .

Alguém me da uma luz???

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

exemplo

Program Juros;

{$APPTYPE CONSOLE}

uses
SysUtils, Crt;
var
vf, vp, tj, t, p, p1, iof : Real;
Begin
ClrScr;
p1 := 0;
WriteLn ('Juros Compostos');
WriteLn;
Write ('Valor Presente: '); ReadLn (vp);
Write ('Taxa de Juros.: '); ReadLn (tj);
Write ('Taxa de IOF.: '); ReadLn (iof);
Write ('Periodo.......: '); ReadLn (p);
t := tj/100; // Taxa em porcento

if p = 1 then // 1 parcela
vf := vp*(1+t*1);

if p = 2 then // 2 parcelas
begin
vf := vp*(1+t*1);
vf := vf + (vf*iof)/100;
end;

if p = 3 then // 3 parcelas
begin
vf := vp*(1+t*1);
vf := vf + (vf*iof)/100;
vf := vf + (vf*iof)/100;
end;

if p = 4 then // 4 parcelas
begin
vf := vp*(1+t*1);
vf := vf + (vf*iof)/100;
vf := vf + (vf*iof)/100;
vf := vf + (vf*iof)/100;
end;

WriteLn;
Write ('O Valor futuro:',vf:8:2);
ReadLn;
End.

OBS: poderia ser mais simplificado o programa, mas só para entender o raciocinio

1 parcela = 900,00 * 7.8% = 970,20

quando for mais de 1 parcela

2 parcelas => 970,20 * 1.7% = 986,69

3 parcelas => 986,69 * 1.7% = 1003,46

4 parcelas => 1003,46 * 1.7% = 1020,51

abraço

Link to post
Share on other sites
  • 0

2 parcelas => 970,20 * 1.7% = 986,69

3 parcelas => 986,69 * 1.7% = 1003,46

4 parcelas => 1003,46 * 1.7% = 1020,51

basta dividir o total pelo numero de parcelas

986,69 / 2 = 493,34

1003,46 / 3 = 334,48

1020,51 / 4 = 255,13

Program Juros;

{$APPTYPE CONSOLE}

uses
SysUtils;//, Crt;
var
vf, vp, tj, t, p, p1, iof : Real;
Begin
//ClrScr;
p1 := 0;
WriteLn ('Juros Compostos');
WriteLn;
Write ('Valor Presente: '); ReadLn (vp);
Write ('Taxa de Juros.: '); ReadLn (tj);
Write ('Taxa de IOF.: '); ReadLn (iof);
Write ('Periodo.......: '); ReadLn (p);
t := tj/100; // Taxa em porcento

if p = 1 then // 1 parcela
vf := vp*(1+t*1);

if p = 2 then // 2 parcelas
begin
vf := vp*(1+t*1);
vf := vf + (vf*iof)/100;
p1 := vf / p;
end;

if p = 3 then // 3 parcelas
begin
vf := vp*(1+t*1);
vf := vf + (vf*iof)/100;
vf := vf + (vf*iof)/100;
p1 := vf / p;
end;

if p = 4 then // 4 parcelas
begin
vf := vp*(1+t*1);
vf := vf + (vf*iof)/100;
vf := vf + (vf*iof)/100;
vf := vf + (vf*iof)/100;
p1 := vf / p;
end;

WriteLn;
Write ('O Valor futuro:',vf:8:2);
Write (p:2:0 ,' Parcelas de :',p1:8:2);
ReadLn;
End.

abraço

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      148894
    • Total Posts
      644915
×
×
  • Create New...