mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 19:55:17 +00:00
15 lines
439 B
Java
Executable file
15 lines
439 B
Java
Executable file
/* Lesson 4 Coding Activity Question 3 */
|
|
|
|
import java.util.Scanner;
|
|
|
|
class U1_L4_Activity_Three {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner scan = new Scanner(System.in);
|
|
System.out.println("Enter a circumference:");
|
|
double cir = scan.nextDouble();
|
|
double rad = cir / (2 * 3.14);
|
|
double area = 3.14 * rad * rad;
|
|
System.out.println("Radius: " + rad + "\nArea: " + area);
|
|
}
|
|
}
|