E-BOX
BASICS OF C PROGRAMMING
Conditional Statements :- Code Analysis
PROBLEM - 8
POOL
You are planning to go for swimming classes. You prefer to enrol in the center which has the swimming pool of a greater area. In the first centre that you visit, the swimming pool is in circular shape(radius – r) . In the next centre that you visit, the swimming pool is in 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.
Output:
Refer Sample Output for format.
[Take the value of pi as 3.14]
Sample Input 1:
Radius:
3
Side:
4
Sample Output 1:
I prefer centre 1
Sample Input 2:
Radius:
10
Side:
1
Sample Output 2:
I prefer centre 1
SOLUTION :
No comments:
Post a Comment