int main(int args, char arg[]){
double money=0.0;
double interest=0.0;
int year=0;
int C=0;
double y;
cout<<"enter how much money is in your account"<<endl;
cin>>money;
cout<<"enter the interest you get"<<endl;
cin>>interest;
cout<<"enter how many years you want calculated"<<endl;
cin>>year;
do{
y=money+(money*interest);
C++;
}while (C<=year);
cout<<y;
system("pause");
}
this is my code it only calculates the first year of interest then thats all it does I've treid every loop but it still had the same problem if anyone could help that would be great