#include <iostream>
#include <string>
Void main()
{
int p;
A=0;
int j;
int R;
int D;
cout<<"enter cost of stereo purchase \n"";
cin>>P;
cout<<"enter Rate of interest per month \n ";
Cin>>R;
cout<<"enter period or Time \n";
cin>>T;
cout<<"enter monthly payment\n";
cin>>D;
do
{ I=(P*R*T)/100;
A=I;
A=A+I;
M=P-I;
P=P-M;
j=j+1
}
while(P>=D)
{ cout<<"the monthsit will take you to pay off
the loan is "j;
cout<<"the Amout of intrest of intrest paid
over the life of loan is"A;
}
getch()
system ("pause");
}
dangutdavid 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.