Hello I writing a program that asks a user to input a deposit amount, the posting frequency, and how many years they plan to save. I am able to print out the final year, but I need to be able to print out the years in between the start date and the end date. I believe I have to use a for loop? Is this correct? Below is a sample of my code.
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
double getinterest;
double rate;
double getdeposit;
int getyears;
double calcsavings;
int choice;
int payments;
getinterest = rate/100;
cout << "How much is your deposit each time? ";
cin >> getdeposit;
cout << "Make a choice how often you want to deposit." << endl
<< "\t1. Yearly\n" << "\t2. Half Year\n"
<< "\t3. Quarterly\n" << "\t4. Monthly\n" << endl
<< "Make your choice: ";
cin >> choice;