This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
int years; | |
double initial_amount, amount_to_add, rate; | |
double calculate(double prev, int count, int years) { | |
return (years == count) |