Covert Program in C++ import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner in = new Scanner(System.in); System.out.print("Enter Area of Circle: "); double area = in.nextDouble(); double r = Math.sqrt(7 * area / 22); System.out.print("Radius of Circle = " + r); } }
Covert
import java.util.Scanner;
public class Main
{
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
System.out.print("Enter Area of Circle: ");
double area = in.nextDouble();
double r = Math.sqrt(7 * area / 22);
System.out.print("Radius of Circle = " + r);
}
}
Given java program
input is area of circle
and output is radius of the circle
import java.util.Scanner;
public class Main
{
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
System.out.print("Enter Area of Circle: ");
double area = in.nextDouble();
double r = Math.sqrt(7 * area / 22);
System.out.print("Radius of Circle = " + r);
}
}
Step by step
Solved in 4 steps with 2 images