Build a program that determines monthly payments for a loan. please add problem statement and pseudo code?
Use these parameters: (1)Loan amount as a float (2)Number of months for the loan as an integer (3)Monthly interest rate expressed as a decimal as a float. Please do not pass the annual interest rate and calculate the monthly rate in the function.
The function should return a floating point value that is the monthly payment on the loan using the formula below. It should not output the payment.
P = ___ B * i_____
(1 – (1 + i) -n )
where: P = loan payment, B = balance, i = interest rate, n = number of payments in the loan.
This payment function will need to raise a floating point number to an integer power. Please use this power function
#include <iostream>

using namespace std ;

int main()
{
float power (int exponent, float number)

{
float result;

if (exponent == 0)
return (1.0);
else
result = power((abs (exponent) - 1), number)* number;
if (exponent >= 1)
return (result);
else
return ( 1.0 / result);

And where is your code to show us? Also please use the [ code ] tag right on top of your message box when you post.

And where is your code to show us? Also please use the [ code ] tag right on top of your message box when you post.

i need help writing the code Taywin. do you have an example of one?

Here's a start:

#include <iostream>
using std::cout;
using std::cin;

int main() {
  return 0;
}

Fill it in.

You can start by getting the inputs from the user...

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.