C语言计算国民生产总值增长率:优化版代码示例
#include<stdio.h>
int main() { float p = 1; float r = 0.09; int n = 10; for(int i=1;i<=n;i++){ p *= (1 + r); } printf('10年后我国国民生产总值与现在相比增长%f\n',p); return 0; }
原文地址: https://www.cveoy.top/t/topic/lRkO 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
#include<stdio.h>
int main() { float p = 1; float r = 0.09; int n = 10; for(int i=1;i<=n;i++){ p *= (1 + r); } printf('10年后我国国民生产总值与现在相比增长%f\n',p); return 0; }
原文地址: https://www.cveoy.top/t/topic/lRkO 著作权归作者所有。请勿转载和采集!