C语言利率

#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
	float rate;
	int count,money=1000;
	
	    for(rate=0.06;rate<=0.12;rate+=0.01){
	    	    //output rate
	    		printf("Interest rate=%5.2f\n",rate);
	    	for(count=0;count<10;count++){
	    		money=money*(1+rate);
	    		//ouput money every year
	    		printf("%dyear\t  money=%d\n",count+1,money);
	    	}
	    	printf("\n");
	    }
    	system("pause");
    	return 0;
}

上一篇:SAP MM MIGO界面上的Freight标签页


下一篇:python 简易版 遗传算法