Advertisement
rasheeqishmam

BD Flag

Jan 23rd, 2019
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main(){
  4.     int t,i,x;
  5.     float green, red,y,r;
  6.     scanf("%d",&t);
  7.     for(i=0;i<t;i++){
  8.         scanf("%d",&x);
  9.         y = x*3/5.0 ;
  10.         r = x/5.0 ;
  11.         red = 3.1416 * pow(r,2) ;
  12.         green = (x*y) - red ;
  13.         printf("%.2f %.2f\n",red,green);
  14.     }
  15.  
  16.     return 0 ;
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement