一、运行结果;
二、源代码;
# define _CRT_SECURE_NO_WARNINGS
# include <stdio.h>
# include <math.h>int main()
{//初始化变量值;double m, r = 0.01;float d = 300000;float p = 6000;//运算还款所需月份;m = log10(p / (p - d * r)) / log10(1 + r);//输出结果;printf("每个月还六千,要还%6.1f个月能还完!!!!!!", m);return 0;
}
三、N-S流程图;