pan305771669 发表于 2013-5-26 23:39:19

新手刚学请教

自己跟着视频练手打的
#include <stdio.h>
#include <math.h>
void main()
{
doubie x,s;

printf("input number;\n");
scanf("%f",&x);
s = sin(x);
printf("sin of %lf is %lf\n', x, s);
}

--------------------Configuration: Hood - Win32 Debug--------------------
Compiling...
Hood.c
C:\桌面\Hood\Hood.c(6) : error C2065: 'doubie' : undeclared identifier
C:\桌面\Hood\Hood.c(6) : error C2146: syntax error : missing ';' before identifier 'x'
C:\桌面\Hood\Hood.c(6) : error C2065: 'x' : undeclared identifier
C:\桌面\Hood\Hood.c(6) : error C2065: 's' : undeclared identifier
C:\桌面\Hood\Hood.c(10) : warning C4244: '=' : conversion from 'double ' to 'int ', possible loss of data
C:\桌面\Hood\Hood.c(11) : error C2001: newline in constant
C:\桌面\Hood\Hood.c(12) : error C2143: syntax error : missing ')' before '}'
执行 cl.exe 时出错.
Hood.obj - 1 error(s), 0 warning(s)
请问哪里错了
谢谢各位大大了

a399634192 发表于 2013-5-27 00:08:50

是double不是doubie      还有后面print括号里面的引号
楼主加油,鱼C加油!我们都看好你哦!

网络学习 发表于 2013-5-27 00:18:27

楼主加油,鱼C加油!我们都看好你哦!
页: [1]
查看完整版本: 新手刚学请教