Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- // TODO code application logic here
- Scanner sc=new Scanner(System.in);
- double r=2.0,w=6.0;
- while(sc.hasNext()){
- int t=sc.nextInt();
- for(int i=1;i<=t;i++){
- int l=sc.nextInt();
- double a1=(double) (Math.PI*(r*r));
- double a2=(l*w)-a1;
- System.out.printf("%.2lf %.2lf\n",a1,a2);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement