guys can anyone help me to make a program with do/while that print how many years an investment will become double or more
investment= 750000 and interested rate is 2.5
Search up on interest calculation, usually here you should have some form of code that you have tried to write yourself before asking questions on it.
If you #include <cmath>, use the pow(x, y) function.
Continuous compound interest is calculated by A = PE^(rt), so in your code you'd have something like
1 2 3
constdouble E = 2.71828;
...
A = investment*pow(E, r*t)