求大神不吝赐教阿 本人新手 刚自学的C语言
求大神 给看看这段代码#include <stdio.h>
#include<stdlib.h>
main()
{
double capital ,deposit,rate;
int year;
printf("Please enter the year,capital:");
scanf("%d,%lf",&year,&capital);
switch(year)
{
case 1:rate = 0.0225;break;
case 2:rate = 0.0243;break;
case 3:rate = 0.0270;break;
case 5:rate = 0.0288;break;
case 8:rate = 0.0300;break;
default: printf("Error rate!\n");
exit (0);
}
deposit=capital*pow(1+rate,year);
printf("deposit = %f\n,rate=%f\n",deposit,rate);
}