关于system("color 0A");
c中 我用system("color 0A");显示[Error]cpp:9: error: `system' was not declared in this scope
怎解决!
#include<stdio.h> #define PI 3.141592659 int main(void) { system("color 0A"); float r,l,s; printf("\n\n\n\n\n\n\n\t\t\t请输入圆的半径(按回车结束):"); scanf("%f",&r); l=2*r*PI; printf("\n…………………………………………………………………………………………………………\n"); printf("\t\t\t这个圆的周长是:%.2f\n",l); s=r*r*PI; printf("\t\t\t这个圆的面积是:%.2f\n",s); }
#include<stdio.h> main(void) { while(1>0) printf("01001"); system("color 0A"); }这里程序执行不到system("color 0A");,前面有个死循环
#include<stdio.h> #define PI 3.141592659 int main(void) { system("color 0A"); float r,l,s; printf("\n\n\n\n\n\n\n\t\t\t请输入圆的半径(按回车结束):"); scanf("%f",&r); l=2*r*PI; printf("\n…………………………………………………………………………………………………………\n"); printf("\t\t\t这个圆的周长是:%.2f\n",l); s=r*r*PI; printf("\t\t\t这个圆的面积是:%.2f\n",s); }这都能过,那那个倒是可以一试...