|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <stdio.h>
#include<stdio.h>
void main()
{
double x,s;
printf("input number:\n");
scanf("%lf",&x);
s=sin(x);
printf(sine of %lf is %lfln",x,s);
}
--------------------Configuration: Hello worid - Win32 Debug--------------------
Compiling...
Hello worid.c
E:\Microsoft Visual Studio\MyProjects\Hello worid\Hello worid.c(10) : warning C4013: 'sin' undefined; assuming extern returning int
E:\Microsoft Visual Studio\MyProjects\Hello worid\Hello worid.c(11) : error C2065: 'sine' : undeclared identifier
E:\Microsoft Visual Studio\MyProjects\Hello worid\Hello worid.c(11) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int '
E:\Microsoft Visual Studio\MyProjects\Hello worid\Hello worid.c(11) : warning C4024: 'printf' : different types for formal and actual parameter 1
E:\Microsoft Visual Studio\MyProjects\Hello worid\Hello worid.c(11) : error C2146: syntax error : missing ')' before identifier 'of'
E:\Microsoft Visual Studio\MyProjects\Hello worid\Hello worid.c(11) : error C2001: newline in constant
执行 cl.exe 时出错.
Hello worid.obj - 1 error(s), 0 warning(s)
少了个双引号:
- #include <stdio.h>
- #include <math.h>
- int main(void)
- {
- double x, s;
- printf("input number:\n");
- scanf("%lf",&x);
- s = sin(x);
- printf("sine of %lf is %lf\n",x,s);
- }
复制代码
|
|