Area OR Perimeter
All submissions for this problem are available.Write a program to obtain length $(L)$ and breadth $(B)$ of a rectangle and check whether its area is greater or perimeter is greater. ###Input: - First line will contain the length $(L)$ of the rectangle. - Second line will contain the breadth $(B)$ of the rectangle. ###Output: Output 2 lines. In the first line print "Area" if area is greater otherwise print "Peri" (Without quotes). In the second line print the calculated area or perimeter (whichever is greater). ###Constraints - $1 \leq L \leq 1000$ - $1 \leq B \leq 1000$ ###Sample Input: 1 2 ###Sample Output: Peri 6 ###EXPLANATION: Area = 1 * 2 = 2 Peri = 2(1 + 2) = 6 Since Perimeter is greater than Area, hence the output is Peri 6
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.5, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.