Question: Can you convert this java file to C++ using the files main.cpp, Functions.h, and fuunctions.cpp please? import java.util.Scanner; public class QuadraticRootTool * @param args public
Can you convert this java file to C++ using the files main.cpp, Functions.h, and fuunctions.cpp please? 
import java.util.Scanner; public class QuadraticRootTool * @param args public static void main (String [] args) Scanner input new Scanner (System.in); System.out.print("Enter a, b, c: "); double ainput.nextDouble); double binput.nextDouble); double c-input.nextDouble(); double discrim b * b-4*a*c; if (discrim 0) double r1-(-b + Math.sgrt(discrim)) / (2 a); double r2-(-b Math.sqgrt dissrim)) / (2 * a); System.out.println("The equation has two roots: " +rland " + r2): else // if(discrim0) double r--b / (2 a); System.out.println("The equation has one root: "+ r); import java.util.Scanner; public class QuadraticRootTool * @param args public static void main (String [] args) Scanner input new Scanner (System.in); System.out.print("Enter a, b, c: "); double ainput.nextDouble); double binput.nextDouble); double c-input.nextDouble(); double discrim b * b-4*a*c; if (discrim 0) double r1-(-b + Math.sgrt(discrim)) / (2 a); double r2-(-b Math.sqgrt dissrim)) / (2 * a); System.out.println("The equation has two roots: " +rland " + r2): else // if(discrim0) double r--b / (2 a); System.out.println("The equation has one root: "+ r)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
