Java2_2

2836 ワード

package pack_e;

import java.util.Scanner;

public class pack_S {

	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	 System.out.print("반지름을 입력하세요:");
	 int rr = sc.nextInt();
	 double p =3.14; //원주율
	 double ss = p*rr*rr;
	 System.out.printf("원의 면적: %.2f",ss);
	 
	}

}