Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- double x,y,z,c,e,d,g;
- scanf("%lf %lf %lf",&x,&y,&z);
- if(x%z==0)
- {
- c=x/z;
- }
- else if(x%z>0)
- {
- e= double ceil(c);
- }
- if(y%z==0)
- {
- d=y/z;
- }
- else
- {
- f= double ceil(e);
- }
- if(x%z==0 && y%z==0)
- {
- g=c*d;
- }
- printf("%lf",g);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement