POOL
Problem Description
You are planning to go for swimming classes. You would prefer to enroll in the center which has the swimming pool of a greater area. In the first centre that you visit, the swimming pool is a circular shape(radius-r). In the next centre that you visit, the swimming pool is of a square shape (side-S). Write a program that will help you to make the choice of the swimming pool.
Input :
Input consists of 2 integers. The first integer correspond to the radius (r) of the circular swimming pool, The second integer corresponds to the side (S) of the square swimming pool.
CODING ARENA
#include <stdio.h>
int main()
{
int r,s,square;
scanf("%d%d",&r,&s);
square=s/r;
printf("I prefer centre %d",square);
return 0;
}
Test Case 1
Input (stdin)4 4
Expected Output
I prefer centre 1
Test Case 2
Input (stdin)4 8
Expected Output
I prefer centre 2
No comments:
Post a Comment