在VisualStdioCode中编译运行C程序一闪而过解决方法

#include <stdio.h>
#include <stdlib.h>
int main()
{
    float a,b;
    a=5;
    b=a*a;
    printf("b=%f\n",b);
    system("pause");
    return 0;
}

在声明部分加入

#include <stdlib.h>

在输出语句后加上以下语句

system("pause");

return 0;