#include <stdio.h> int main() { printf("请输入一个华氏温度"); float fah; float tem; scanf("%f",&fah); tem=5.0*(fah-32)/9;//c=5(F-32)/9 printf("\n摄氏温度是%3.2f",tem); return 0; }
E:\C exeperiment\Text1.c(5) : error C2143: syntax error : missing ';' before 'type'
E:\C exeperiment\Text1.c(6) : error C2143: syntax error : missing ';' before 'type'
E:\C exeperiment\Text1.c(7) : error C2065: 'fah' : undeclared identifier
E:\C exeperiment\Text1.c(8) : error C2065: 'tem' : undeclared identifier
E:\C exeperiment\Text1.c(8) : warning C4244: '=' : conversion from 'double ' to 'int ', possible loss of data
执行 cl.exe 时出错.
Text1.obj - 1 error(s), 0 warning(s)
Youare_my_sunshine
相关分类