Answers for "Program to find number of solutions in Quadratic Equation c#"

C#
0

Program to find number of solutions in Quadratic Equation c#

static void checkSolution(int a, int b, int c) 
    { 
  
        // If the expression is greater than 0,  
        // then 2 solutions 
        if (((b * b) - (4 * a * c)) > 0) 
            System.out.println("2 solutions"); 
  
        // If the expression is equal 0, then 2 solutions 
        else if (((b * b) - (4 * a * c)) == 0) 
            System.out.println("1 solution"); 
  
        // Else no solutions 
        else
            System.out.println("No solutions"); 
    }
Posted by: Guest on September-23-2020

Code answers related to "Program to find number of solutions in Quadratic Equation c#"

C# Answers by Framework

Browse Popular Code Answers by Language