#include <iostream.h>
void askforprices();
double rate (double old_price, double new_price);
int main()
{
askforprices();
return 0;
}
void askforprices()
{
double old_price, new_price, rate;
cout << "Please enter old price\n";
cin >> old_price;
cout<<"Please enter new price\n";
cin >> new_price;
rate = rate(old_price, new_price); //points to this location for an error
}
double rate(double old_price, double new_price)
{
double rate;
rate = (new_price - old_price)/old_price;
return rate;
}
<< moderator edit: added code tags: [co[u][/u]de][/co[u][/u]de]
>>