Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class circles
- {
- public static void main(String[] args) {
- double Radius = 3.712;
- double circumference = (Math.PI * 2 * Radius);
- double area = (Math.PI * Radius * Radius);
- circumference = (double)Math.round(circumference * 100d) / 100d;
- area = (double)Math.round(area * 100d) / 100d;
- System.out.println("The Radius of the circle = " + Radius);
- System.out.println("The Area of the circle = " + area);
- System.out.println("The Circumference of the circle = " + circumference);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement