Answered step by step
Verified Expert Solution
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 where is the length of the side of
square.
Now Zac has photos of various dimensions.
Dimension of a photo is denoted as
where width of the photo and Height of the photo.
When any photo is uploaded following events may occur:
If any of the width or height is less than L user is prompted to upload another
one. Print "UPLOAD ANOTHER" in this case.
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 as input, print appropriate text as output.
Input:
First line contains L
Second line contains number of photos.
Following lines each contains two space separated integers and
Output:
Print appropriate text for each photo in a new line.
Constraints:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started