Solve this problem
0 Answers
Solve this problem
| Flag | PURGE
You are asked q queries each of which can be of type 1 or type 2 Type 1 : Report the area of square of side S. Type 2 : Report the area of rectangle of sides L and R.
Input
The first line of the input contains single integer Q.
Next Q line contains the queries.
Each query first contains type of query
if query is of type one you are given a single integer S
if query is of type two you are given two integers L and R
Constraints
1 <= Q <= 25
1 <= T <= 2
1 <= S,L,R <= 1000
Output
Output Q line each containing answer to the asked query
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.