Answer:
Let me take up the opportunity to answer this question being a experienced python and java programmer
Your programmer is as follows:
public class Program{
public static void main(String[] args){
float radius = 10;
float perimeter = 2 * 3.14 * radius
System.out.println(perimeter);
}
(Since the formula to calculate the perimeter of a circle is 2 into pie into radius of the circle)
import java.util.Scanner;
public class CirclePerimeter {
public static void main(String[ ] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Radius : ");
double radius = sc.nextDouble();
// Perimeter = 2πr
double perimeter = 2 * Math.PI * radius;
System.out.println("Perimeter - " + perimeter);
Copyright © 2024 EHUB.TIPS team's - All rights reserved.
Answers & Comments
Verified answer
Answer:
Let me take up the opportunity to answer this question being a experienced python and java programmer
Your programmer is as follows:
public class Program{
public static void main(String[] args){
float radius = 10;
float perimeter = 2 * 3.14 * radius
System.out.println(perimeter);
}
}
(Since the formula to calculate the perimeter of a circle is 2 into pie into radius of the circle)
import java.util.Scanner;
public class CirclePerimeter {
public static void main(String[ ] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Radius : ");
double radius = sc.nextDouble();
// Perimeter = 2πr
double perimeter = 2 * Math.PI * radius;
System.out.println("Perimeter - " + perimeter);
}
}