Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int START_TUITION = 10000;
- const int GOAL_TUITION = 20000;
- int main() {
- int years;
- float recusiveTuition;
- recusiveTuition = START_TUITION;
- for (int i; recusiveTuition < GOAL_TUITION; i++, years++) {
- recusiveTuition *= .07;
- }
- cout << "It will be " << years << " years until the tuition is doubled.";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement