Advertisement
testr1231231231

Untitled

Mar 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int START_TUITION = 10000;
  5. const int GOAL_TUITION = 20000;
  6.  
  7. int main() {
  8. int years;
  9. float recusiveTuition;
  10. recusiveTuition = START_TUITION;
  11. for (int i; recusiveTuition < GOAL_TUITION; i++, years++) {
  12. recusiveTuition *= .07;
  13. }
  14. cout << "It will be " << years << " years until the tuition is doubled.";
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement