#include #include int main() { int r, w, l, tc = 0; double alpha, rest; FILE *ifp; ifp = fopen("alfredo.in", "r"); while (1) { tc++; fscanf(ifp, "%d", &r); if (!r) break; fscanf(ifp, "%d %d", &w, &l); if (w >= 2*r || l >= 2*r) { printf("Pizza %d does not fit on the table.\n", tc); continue; } alpha = asin((double)l / (2 *r)); rest = 2 * r * cos(alpha); if (w <= (int)(round(rest))) { printf("Pizza %d fits on the table.\n", tc); } else { printf("Pizza %d does not fit on the table.\n", tc); } } return 0; }