BETA
Successful submissions of School Problems are not counted in user ratings.

Submissions : 236 Accuracy :

38.14

Java Switch Case statement
       

Today your task is simple. You have to calculate area of circle and rectangle depending upon user's choice.

Input:
First line of the input contains an integer T which denotes the number of test cases. Then T test cases follow.  Each test case contains two lines. First line contain 1 for circle or  2 for rectangle.Second line contains integers R(radius) or L(length) and B(Breadth)(space separated).

Output: 
For each test case, print area of circle or rectangle.

Constraints:
1 <= T< = 10
1<=R<=10
1<=L<= 10
1<=B<= 10

Note: Use Math.PI for pi value.
Example:
Input:

2
1
5
2
5 10    

Output:
78.53981633974483
50

**For More Examples Use Expected Output**


Contributor: Gaurav Miglani

Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.