(1)你将scanf改成scanf_s试试。编译器觉得scanf_s这是比较安全的函数。(2)你如果是int main,最后要写一个return 0;(3)int main还是void main,取决于你是否需要给系统返回参数。初学者不必纠结这个