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? Can you convert this java file to C++ using the files main.cpp,

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!