Advertisement
sujonshekh

inputarea

Jun 2nd, 2016
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3.  
  4. /*
  5.  * To change this template, choose Tools | Templates
  6.  * and open the template in the editor.
  7.  */
  8.  
  9.  
  10. /**
  11.  *
  12.  * @author cse
  13.  */
  14. public class NewInput {
  15.  
  16.     /**
  17.      * @param args the command line arguments
  18.      */
  19.     public static void main(String[] args) {
  20.         // TODO code application logic here
  21.         Scanner sc;
  22.         sc= new Scanner(System.in);
  23.         int n= sc.nextInt();
  24.  
  25.         System.out.println(n);
  26.         for(int i=1; i<=n; i++)
  27.         {
  28.            int r= sc.nextInt();
  29.            double area= 3.1416*r*r;
  30.            System.out.println(area);
  31.          
  32.              
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement