alright, I have taken your advice, and here is the revised code. I am getting an error message. It says [Warning] in function 'double: I have no idea why it is saying this.

#include <iostream>

using namespace std ;

//function prototype

double payment(double balance, double AIR, int num_of_pay);

//funciton prototyp

double power (int num_of_pay, double AIR, float number);

int main ()

{

double month_pay; //

double balance; //amount of loan

double AIR; //annual interest rate

int num_of_pay ; //number of payments over course of loan

double result;

cout<< "Welcome to the loan payment calculator program!"<<endl ;

cout<< " Please enter the loan amount:"<<endl ;

cin>> balance;

cout<< " Please enter the annual interest rate as a percentage, not a decimal:"<<endl;

cin>> AIR;

cout<< "Please enter number of payments you will pay:"<<endl;

cin>> num_of_pay;

month_pay = payment(balance, AIR, num_of_pay);

cout<< "The amount of your monthly payment is: $" << month_pay <<endl;

system("PAUSE");

return (0);

}

//************************************************** ***********

double power (int num_of_pay, double AIR, float number);

double payment(double balance, double AIR, int num_of_pay)

/*This function computes the*/

/*amount of monthly payments*/

/*inputs???????????????????*/

/*balance, air, num_of_pay?*/

/*(double)?????????????????*/

/* outputs?????????????????*/

/*monthly payment??????????*/

{

double numerator;

double denominator;

double result;

double month_pay;

AIR = (AIR/100)/12;

denominator = power (num_of_pay, AIR, number);

numerator = balance*AIR;

denominator = (1-denominator);

return (numerator/denominator);

}

//************************************************** ***************

//This function raises 1+AIR to a negative n power

double power (int num_of_pay, double AIR, float number)

{

float result;

int i;

number = (1 + AIR);

result = 1.0;

for (i=0; i< abs (num_of_pay); i++) result *= number;

if (num_of_pay > 0)

return (result);

else

return (1.0 / result);

}