我想出的是: 付款=(费率*(1.0 +费率)* pow(已付款))/((1.0 +费率)* pow(已付款)-1.0)*贷款
它告诉我“没有重载函数pow的实例匹配参数列表。参数类型:double
代码:
double rate, payment, loan, madepayments, name, paidback,interestpaid;
cout << "Enter the loan amount: ";
cin >> loan;
cout << "Enter the annual interest rate: ";
cin >> rate;
cout << "Enter the number of payments made: ";
cin >> madepayments;
cout << "Enter the customer's name: ";
cin >> name;
payment = (rate * (1.0 + rate) * pow(madepayments)) / ((1.0 + rate) * pow(madepayments) - 1.0) * loan;