Advertisement
arabdy

diametro

Oct 21st, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class area {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner input=new Scanner(System.in);
  8.         int n=input.nextInt();
  9.        
  10.         double A=0;
  11.         for(int i=0;i<n;i++){
  12.             double L=input.nextLong();
  13.             double D=input.nextLong();
  14.             A=(L*D)+(Math.PI*((D/2)*(D/2)));
  15.            
  16.             System.out.println(A);
  17.            
  18.         }
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement