/parking_slot_calculator

finds the park slot which is furthest to nearest car

Primary LanguageC

c_parking_slot_calculator

finds the park slot which is furthest to nearest car

summary

step1: (Size: )

Program wants a size for a square parking slot. For example, if you want a parking area with the size of 20x20 (400cars), you can enter size as 20. Maximum size is defined as 50.

step2: (Cars: )

Program wants the number of parked cars in the area. You should enter valid number for parking area, you cannot park 10 cars in a 3x3, program outputs "No slot found".

step3: (Locations: )

Program asks this for each parked car. You should enter valid X and Y coordinates for cars. If you enter a location which is out of parking area, program doesn't warn you.

step4: Output

Program outputs the furthest slot to nearest car. This is the slot which is easiest and safest position to park.