c语言题:某客户为购房办理商业贷款,选择了按月等额本息还款方式,计算公式如下。在贷款本金(loan
展开全部#include float cal_power(float x,int n) { float p=1.0;while(n>0){ p=p*x;n-;} return p;} float cal_money(int loan,float rate,int month) { double tmp;tmp=cal_power(1+rate,month);return loan*rate*tmp/(tmp-1);} int main(void) { int loan,year,month;float money,rate;printf(... 20210311