- codewithshiva

Latest

Search Bar

Thursday, July 8, 2021

Area and Perimeter

Description

You are given the sides of the rectangle, l and b on a new line.

You need to find the Area and Perimeter of that rectangle.

Input

First-line contains T, the total no of test cases.

The first line of each test case contains two space-separated integers L and B, the length and breadth of the rectangle.

Constraints

1 <= T <= 10

1 <= L, B <= 10^4

Output

For each test case print area and perimeter of a rectangle.

Sample Input 1 

2
4 4
5 4

Sample Output 1

16 16
20 18

Hint

Area of rectangle with length 4 and breadth 4 => 4*4 = 16

Perimeter of rectangle with length 4 and breadth 4 => 2*(4+4) = 16

Language: 
Java
 
 
Theme: 
Dark

No comments:

Post a Comment