关于main()的参数问题
#include<stdio.h>#include<stdlib.h>
int main(int argc,char *argv[])
{
int sum = 0;
while (argc-- != 1)
{
sum += atoi(argv);
}
printf("%s = %d\n",argv,sum);
return 0;
}
F:\Learn C Language\C语言作业\s1e23\0.main()的参数.exe = 0
--------------------------------
Process exited after 0.2171 seconds with return value 0
请按任意键继续. . .
哪里是命令行?为啥都不给我输入的机会? 用 Windows 命令行 Winkey+R,输入cmd,然后回车
具体cmd用法我就不教你了
页:
[1]