| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 747 人关注过本帖
标题:错误 erroe 2447 如何修改
取消只看楼主 加入收藏
zhaobin1994
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2013-9-10
结帖率:0
收藏
 问题点数:0 回复次数:0 
错误 erroe 2447 如何修改
#include<stdio.h>
#include<math.h>
float x1,x2;
double p,q,di;

greater_than_zero(float a,float b);                  
{
    x1=(-b+sqrt(di))/(2*a);
    x2=(-b-sqrt(di))/(2*a);
}
equal_to_zero(float a,float b);
            
{
    x1=x2=-b/(2*a);
}
smaller_than_zero(float a, float b);
                  
{
    p=-b/(2*a);
    q=sqrt(-di)/(2*a);
}
 main()
{
    float a,b,c;
    printf("请输入方程的各项系数");
    scanf("%f,%f,%f",&a,&b,&c);
   
    printf("方程%6.3fx*x+%6.3fx+%6.3f=0的解为:\n",a,b,c);
    di=b*b-4*a*c;
   
    if(di>0)
    {
        greater_than_zero(a,b);
        printf("x1=%6.3f,x2=%6.3f\n",x1,x2);
    }
    if(di=0)
    {
        equal_to_zero(a,b);
        printf("x1=x2=%6.3f\n",x1);
    }D:\新建文件夹\Microsoft Visual Studio\MyProjects\求根程序\求根.cpp(7) : error C2447: missing function header (old-style formal list?)
D:\新建文件夹\Microsoft Visual Studio\MyProjects\求根程序\求根.cpp(13) : error C2447: missing function header (old-style formal list?)
D:\新建文件夹\Microsoft Visual Studio\MyProjects\求根程序\求根.cpp(18) : error C2447: missing function header (old-style formal list?)
搜索更多相关主题的帖子: include double 如何 
2013-09-10 14:54
快速回复:错误 erroe 2447 如何修改
数据加载中...
 
   



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

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