Esempio n. 1
0
void main(){
	int a;
	printf("1、用复利计算\n");
	printf("2、用单利计算\n");
	printf("3、输出复利计算、单利计算的结果\n");
	printf("4、输入终止时金额求存款\n");
	printf("\n请输入你的选择:");
	scanf("%d",&a);
	if(a==1)
		Compounding();
	else if(a==2)
		Simple_Interested();
	else if(a==3)
		Comparison();
	else if(a==4)
		Count_Deposit();
}
Esempio n. 2
0
void Comparison(){
    printf("\t\t<复利计算器>\n");
    Compounding();
    printf("\t\t<单利计算器>\n");
    Simple_Interested();
}
Esempio n. 3
0
void main(){
    char t;
	int a;
	menu();
loop:
    printf("\n请输入你的选择:");
	if(scanf("%d",&a)==1){
    switch(a)
    {
    case 0:
         exit(0);
		 break;
    case 1:
        system("cls");
        t=getchar();
        Compounding();
        break;
    case 2:
        system("cls");
        t=getchar();
        Simple_Interested();
        break;
    case 3:
        system("cls");
        t=getchar();
        Comparison();
        break;
    case 4:
        system("cls");
        t=getchar();
        Count_Deposit();
        break;
    case 5:
        system("cls");
        t=getchar();
        Count_Year();
        break;
    case 6:
        system("cls");
        t=getchar();
        Count_Interest();
        break;
    case 7:
        system("cls");
        t=getchar();
        Count_Money();
        break;
    case 8:
        system("cls");
        t=getchar();
        Count_Refunt();
        break;
    default:
        printf("输入有误!请重新输入!(目前功能选项只有1~8)\n");
        goto loop;
    }    
	}
	else{
		system("cls");
        t=getchar();
		printf("\n输入有误!请重新输入!(目前功能选项只有1~8)\n\n");
        main();
	}
}