Computer Science, asked by pirates817, 4 months ago

Take Input A,B,C And Calculate S=(B2-4ac)/2a.Print S

Please do correctly java program really very important ​

Answers

Answered by udayagrawal49
1

Answer:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 try{

  System.out.println("Enter three numbers");

  Scanner scan = new Scanner(System.in);

  double A = scan.nextDouble();

  double B = scan.nextDouble();

  double C = scan.nextDouble();

  scan.close();

  double S = (Math.pow(B,2)-(4*A*C))/(2*A);

  System.out.println("The value of S is "+S);

 }

 catch (Exception e) {

  System.out.println("Some error occured");

 }

}

}

Please mark it as Brainliest.

Similar questions