Advertisement
Guest User

Untitled

a guest
Mar 26th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     double x,y,z,c,e,d,g;
  5.     scanf("%lf %lf %lf",&x,&y,&z);
  6.     if(x%z==0)
  7.     {
  8.         c=x/z;
  9.  
  10.     }
  11.     else if(x%z>0)
  12.     {
  13.        e= double ceil(c);
  14.     }
  15.     if(y%z==0)
  16.     {
  17.        d=y/z;
  18.     }
  19.     else
  20.     {
  21.        f= double ceil(e);
  22.     }
  23.     if(x%z==0 && y%z==0)
  24.     {
  25.         g=c*d;
  26.     }
  27.     printf("%lf",g);
  28.     return 0;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement