>>>> I can't seem to get it correct
You might post the full assignment or ask detailed questions. With a statement like that we hardly can help you. EE experts may help with homework questions only if there was a serious attempt by the asker to solve the assignment himself/herself which I can't see from the code above.
Some hints nevertheless:
1. You should add a user interface where the user can enter amount, interest and term.
2. You should have a loop so that the user can do more than one calculation.
3. Ask the user whether she wants to quit or goon after calculataion.
Break the loop if quit.
Regards, Alex
Main Topics
Browse All Topics





by: avizitPosted on 2007-07-16 at 22:37:25ID: 19502393
you are never reading any user inputs, hence your program is using the fixed values you have put inside the program.
so for interest its using 5.75 etc etc
here's a sample program which shows how to read two integers and adds them up and displays the sum.
you can do something similar to achieve your results
#include <iostream>
int main(){
int i; //declare i as integer
std::cin>>i; //read i from user input
int j;
std::cin>>j; //similar
int k = i + j; // k is sum of i and j
std::cout<<"sum is: "<<k<<std::endl;
return 0;
}