我看了好久 指不出错误啊
#include<stdio.h>#include<math.h>
double profits(double I,double S,int Y);
void main()
{
int Y;
double S,I,M,n;
printf("请输入年利润,投资钱数和年数:");
scanf("%lf %lf %d",&I,&S,&Y);
printf("第%d的年利润为%lf\n",Y,profits(I,S,Y));
}
double profits(double i,double j,int k)
{
int Y;
double I,S,n,M;
n=pow(1+I,Y);
M=S*n;
return M;
}