Weird Cake

A sphere-shaped cake is cut down with two parallel planes which gives three pieces of cake. The heig…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

#include <stdio.h>

int main() {
int H,h1,h2,z3,y3;
float r,z1,pi,p,y1,X,Y,Z;
scanf(“%d %d %d”,&H,&h1,&h2);
r=H/2;
pi=acos(-1);
p=pi/3;
z1=3r-h2;
z3=h2
h2;
Z=z1pz3;
y1=3r-h1;
y3=h1
h1;
Y=py3y1;
Y=Y-Z;
X=rrr;
X=p4X;
X=X-Y-Z;

printf("%f %f %f",X,Y,Z);

return 0;

}

what’s wrong with this code?

The problem statement says,
“Input contains several test cases. Each test case contains three space-separated integers”

the number of testcases won’t be given.
This was a bit confusing.