public class text {
    public static void main(String[] arg){
                //判断a*x*x+b*x+c=0 是不是一元二次方程
        int a=1,b=2,c=3,d=b*b-4*a*c;
        if(a==0){
            System.out.print("不是一元二次方程");
        }
        else if(d>0){
            System.out.print("两个不相等的实根");
            
        }
        else if(d==0){
            System.out.print("两个相等的实根");
        }
        else{
            System.out.print("没有实根");
        }
        
        
    }
}                

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
猜你喜欢
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-07-17
  • 2021-06-20
相关资源
相似解决方案