Answers for "Write a program that asks the user for the radius of a circle, then have it print the area and circumference rounded to two decimal places java"

1

area of circle in java

import java.util.Scanner;
public class AreaOfCircle {
   public static void main(String args[]){
      int radius;
      double area;
      Scanner sc = new Scanner(System.in);
      System.out.println("Enter the radius of the circle ::");
      radius = sc.nextInt();
      area = (radius*radius)*Math.PI;
      System.out.println("Area of the circle is ::"+area);
   }
}
Posted by: Guest on September-02-2020

Code answers related to "Write a program that asks the user for the radius of a circle, then have it print the area and circumference rounded to two decimal places java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language