using loop to calculate the interest with unknown time [closed]

I have to to write a program that could help me to calculate the interest rate with unknown time

the credit is about 10000 and the is 7% and to pay in instalments 1500 i want the redemption and the remain, when the program reach 0 remain should stop

double kredit = 10000;

const double ZinsenProzent = 0.07;

double Teilgung, Zinsen, Restschuld = 10000, Annuitaet = 1500;

do {
    Zinsen = Restschuld * ZinsenProzent;
    cout << "zinsen" << Zinsen << endl;

    Teilgung = Annuitaet - Zinsen;
    cout << "teilgung" << Teilgung << endl;

    Restschuld = Restschuld - Teilgung;
    cout << "rest ist" << Restschuld << endl;
} while (Restschuld > 0);


from Recent Questions - Stack Overflow https://ift.tt/3nzCJ8y
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation