Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVASCRIPT Zac wants to change his profile picture on Facebook. Now Facebook has some restriction over the dimension of picture that we can upload. Minimum

JAVASCRIPT
Zac wants to change his profile picture on Facebook. Now Facebook has some
restriction over the dimension of picture that we can upload.
Minimum dimension of the picture can be LL, where L is the length of the side of
square.
Now Zac has N photos of various dimensions.
Dimension of a photo is denoted as WH
where W- width of the photo and H- Height of the photo.
When any photo is uploaded following events may occur:
[1] If any of the width or height is less than L, user is prompted to upload another
one. Print "UPLOAD ANOTHER" in this case.
[2] If width and height, both are large enough and
(a) if the photo is already square then it is accepted. Print "ACCEPTED" in this case.
(b) else user is prompted to crop it. Print "CROP IT" in this case.
Given L, N, W and H as input, print appropriate text as output.
Input:
First line contains L.
Second line contains N, number of photos.
Following N lines each contains two space separated integers W and H.
Output:
Print appropriate text for each photo in a new line.
Constraints:
1L,W,H10000
1N1000
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions