C++我代码哪里出错了啊 我怎么都看不出来

#include
#include
main()

{
int n;
double rate;
double capital;
double deposit;

    printf("Please enter rate, year, capital:");
    scanf_s("%lf,%d,%lf", &rate, &n, &capital);

    deposit = capital * pow(1 + rate, n);

    printf("deposit = %f\n", deposit);
    getch();

}

year没有定义,main函数没有返回值。getch();要看编译器,不一定支持。

函数类型,命名空间呢

去掉getch,调用头文件math.h 是否调用?

#include 并且在main最后return 0