Anik_Akash

Loj-1022

May 16th, 2020
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5.     int i, t;
  6.     double r, ans, carea, barea, pi;
  7.      pi=2*acos(0.0);
  8.     scanf("%d", &t);
  9.     for(i=1; i<=t; i++){
  10.         scanf("%lf", &r);
  11.         carea= pi*r*r;
  12.         barea = pow((2*r),2);
  13.         ans= barea-carea;
  14.         printf("Case %d: %.2lf\n", i, ans);
  15.     }
  16.     return 0;
  17. }
RAW Paste Data