求问各位大佬,不知道那一步出了错
#include <stdio.h>
#include <math.h>
int main()
{
double a,b,c,d,x1,x2;
printf("Input a,b,c=");
scanf("%f,%f,%f",&a,&b,&c);
d=bb-4ac;
if(d>0)
{
x1=(-b+sqrt(d))/(2a);
x2=(-b-sqrt(d))/(2a);
printf("The equation has distinct real roots:%f and %f\n",x1,x2);
}
if(d==0)
{
x1=x2=-b/(2a);
printf("The equation has two equal root:%f\n",x1);
}
if(d<0)
{
printf("The equation have no real roots.\n");
}
return 0;
}
求方程的根,编译的时候发现不进if语句里
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
悬赏问题
- ¥15 phython读取excel表格报错 ^7个 SyntaxError: invalid syntax 语句报错
- ¥20 @microsoft/fetch-event-source 流式响应问题
- ¥15 ogg dd trandata 报错
- ¥15 高缺失率数据如何选择填充方式
- ¥50 potsgresql15备份问题
- ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
- ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
- ¥60 pb数据库修改与连接
- ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
- ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?