Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.lang.Math.*;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int n = in.nextInt();
- int[] l =new int[n];
- for(int i=0; i<n;i++) {
- l[i] = in.nextInt();
- }
- for(int i=0;i<n;i++){
- if(l[i]>0&& l[i]<=1000) {
- double w = l[i] * ((double) 6 / 10.0);
- double r = l[i] / 5.0;
- double re = (l[i]) * (w);
- double cir = Math.PI * (r * r);
- double rec = (re - cir);
- System.out.printf("%.2f %.2f\n", cir, rec);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement