Output:
Click Here For Java Online Compiler
Solution:
*** Circumference of Circle *** Enter The Radius of Circle: 25 Circumference of Circle is: 157.07963267948
Click Here For Java Online Compiler
Solution:
import java.util.Scanner; class CircumferenceOfCircle { static void circumference(int radius) { double cir = 2 * Math.PI * radius; System.out.println("Circumference of Circle is: " + cir); } public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("*** Circumference of Circle ***" + "\n"); System.out.print("Enter The Radius of Circle: "); int radius = scanner.nextInt(); circumference(radius); //call circumference method } }
comment 0 comments:
more_vertsentiment_satisfied Emoticon