Facebook
From Little Bee, 1 Year ago, written in Plain Text.
This paste is a reply to Re: Calculate radius n12 from Putrid Moth - go back
Embed
project IX;

import java.util.Scanner;

public class homework4 {

{
    public static void radius_args(double radius) {
        double=Math.Pi;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        
        System.out.print("Enter the radius of the circle: ");
        double radius = scanner.nextDouble();
        
        double area = calculateArea(radius);
        double circumference = calculateCircumference(radius);
        
        System.out.println("The area of the circle is: " + area);
        System.out.println("The circumference of the circle is: " + circumference);
    }
    
    public static double calculateArea(double radius) {
        return Math.PI * radius * radius;
    }
    
    public static double calculateCircumference(double radius) {
        return 2 * Math.PI * radius;
    }
}

Replies to Re: Re: Calculate radius n12 rss

Title Name Language When
Re: Re: Re: Calculate radius n12 Gamboge Meerkat text 1 Year ago.