#include
float principal=1000;
float interest_1=0.0325;
float interest_2=0.0035;
float principal_year_1(){
float sum=0.0;
sum=1000*(interest_1/12.0)*6;
return sum;
}
float Regular_principal_year(){
float sum=0.0;
sum=1000*interest_1;
return sum;
}
float Demand_principal_year(){
float sum=0.0;
sum=1000*interest_2;
return sum;
}
float principal_year(){
float sum=0.0;
sum=1000*(interest_1/12.0)*6;
sum=(1000+sum)*((interest_2/12.0)*6);
return sum;
}
int main(){
printf("
定期一年利息=%f\n,定期一年本金=1000\n,活期一年利息=%f\n,
活期一年本金=1000\n,定期半年、活期半年利息=%f\n,定期半年、活期半年本金=%f\n",
Regular_principal_year(),Demand_principal_year(),
principal_year()+principal_year_1(),principal_year_1()+1000);
return 0;
}