我通过使用 MSVC
cl file.c
Run Code Online (Sandbox Code Playgroud)
用这个非常简单的代码:
#include <stdio.h>
#include <stdlib.h>
int
main(void) {
int num = 50, pointNum = 60, max = 0;
puts("Hello");
for (int i = 0; i <= num; i++) {
printf("%d\n", pointNum % i);
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
但是当我从命令行运行它时,它只是暂停然后崩溃,只打印“Hello”。我不知道出了什么问题,因为它似乎没有错误。