Overlap percentage | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Overlap percentage

On XY plane, you are given the width (w) and height (h) of the rectangles. Then upper left coordinates (x, y) of the two rectangles are given in the following two lines where 0 <= (x, y) <= 10000 and 1 <= (w, h) <= 100. Find the intersection percentage of the rectangles. Output specification Show a floating point number with 3 decimal places Input 4 3 1 4 3 5 Output 33.333 note : it should be a solution for beginner just by using while, for , if loops.

8th Apr 2018, 6:28 PM
Flora
3 Antworten
+ 2
I don't know why so many people posted this question today, look I found these threads, they all contain similar questions, no mean to be rude but one can at least check by searching right? (Edit) The second one apparently got removed. https://www.sololearn.com/Discuss/1202452/?ref=app https://www.sololearn.com/Discuss/1203101/?ref=app
8th Apr 2018, 9:44 PM
Ipang
+ 2
@Klea posted the original question and Flora just asked for help, but the third question was not poorly searched, it was a shortened copy. That's why I reported it and the mod team removed it.
8th Apr 2018, 9:56 PM
Timon Pa├člick
0
someone please help me
8th Apr 2018, 6:32 PM
Flora