求解system("color 0A")怎么用?
#include<stdio.h>void main()
{ system("color 0A");
float f,c;
printf("请输入华氏温度:");
scanf("%f",&f);
c=(5.0/9)*(f-32);
printf("华氏温度%f对应的摄氏温度为%f\n",f,c);
}
运行后出现
--------------------Configuration: 3-1 - Win32 Debug--------------------
Compiling...
3-1.c
D:\学习\3-1.c(3) : warning C4013: 'system' undefined; assuming extern returning int
D:\学习\3-1.c(4) : error C2143: syntax error : missing ';' before 'type'
D:\学习\3-1.c(6) : error C2065: 'f' : undeclared identifier
D:\学习\3-1.c(7) : error C2065: 'c' : undeclared identifier
D:\学习\3-1.c(7) : warning C4244: '=' : conversion from 'double ' to 'int ', possible loss of data
执行 cl.exe 时出错.
3-1.obj - 1 error(s), 0 warning(s)
该怎么解决啊?
[ 本帖最后由 mujunyixin 于 2013-9-13 20:25 编辑 ]