| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2572 人关注过本帖
标题:新手求教:: `sin' was not declared in this scope
只看楼主 加入收藏
ly02
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2012-2-15
收藏
 问题点数:0 回复次数:5 
新手求教:: `sin' was not declared in this scope
#include
#include
main()
    {
    double x,s;
   
    printf("input number:\n");
   
    scanf("%lf",&x);

    s=sin(x);
   
    printf("sine of %lf is %lf\n",x,s);
    }

[Error] C:\Users\Administrator\Documents\C-Free\Temp\未命名1.cpp:11: error: `sin' was not declared in this scope
搜索更多相关主题的帖子: 命名 Documents declared include 
2012-02-16 10:51
ly02
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2012-2-15
收藏
得分:0 
这是怎么回事啊   第一次求教
2012-02-16 10:59
noben323
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-2-16
收藏
得分:0 
#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);
}
2012-02-16 11:47
ly02
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2012-2-15
收藏
得分:0 
回复 3楼 noben323
谢谢,编译通过
2012-02-16 12:06
yxiangyxiang
Rank: 3Rank: 3
来 自:/\/\/\/\/
等 级:论坛游侠
帖 子:130
专家分:186
注 册:2012-1-29
收藏
得分:0 
#include<stdio.h>
#include<math.h>
main()
    {
    double x,s;
   
    printf("input number:\n");
   
    scanf("%lf",&x);

    s=sin(x);
   
    printf("sine of %lf is %lf\n",x,s);
    }

2012-02-16 12:56
guang0725
Rank: 2
等 级:禁止访问
帖 子:70
专家分:70
注 册:2011-9-5
收藏
得分:0 
你都没有加上头文件名  
2012-02-16 16:52
快速回复:新手求教:: `sin' was not declared in this scope
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017352 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved