How to do the second part of problem?

The problem is given in image in following link:-
https://i.imgsafe.org/c07c7c9.png

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
using namespace std;
int main()
{
	double face_value, interest, p_interest, duration, new_value;
	char again;
	
	do
	{
		cout << "Please enter the face value of loan:- $";
		cin >> face_value;
		cout << "Enter the interest rate:- ";
	        cin >> interest;
		cout << "Enter the duration in years:- ";
	        cin >> duration;

	    interest = interest / 100;
	    p_interest = face_value * interest;
	    new_value = duration * p_interest;
	    face_value = face_value - new_value;

		cout << "   \n";
	        cout << "The amount you will get will be $" << face_value;
		cout << "       \n";
		cout << "      \n";
		cout << "Do you want to recheck?\n";
		cout << "Type y For Yes and N for No then press return key\n";
		cin >> again;
	} while ( (again == 'y') || (again == 'Y') );
	
	return 0;
}

The second part is "the program should also calculate the monthly payment". So first question is "Am I gong right" and second "how to Calculate monthly payment?"
The second part is "the program should also calculate the monthly payment". So first question is "Am I gong right" and second "how to Calculate monthly payment?"


According to the description of what you need to accomplish, no. You're not going right. You were to ask the user for the amount they wanted to receive, not the face value of the loan. Enough information is given for you to determine the formula you need to use.

[Edit: The instructions give very clear directions now how to calculate the monthly payment.]
Last edited on
Topic archived. No new replies allowed.