更改使用的编辑器了,VSCode
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello World!\n");
printf("你好世界!\n");
system("pause"); // 防止运行后自动退出,需头文件stdlib.h
return 0;
}
- C语言中使用system(“pause”)需要头文件stdlib.h
文章展示了如何在VisualStudioCode(VSCode)编辑器中编写并运行一个简单的C语言程序,该程序包含`stdio.h`和`stdlib.h`头文件,使用`printf`输出HelloWorld!和你好世界!,并通过`system(pause)`防止程序运行后立即退出。
更改使用的编辑器了,VSCode
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello World!\n");
printf("你好世界!\n");
system("pause"); // 防止运行后自动退出,需头文件stdlib.h
return 0;
}
294

被折叠的 条评论
为什么被折叠?