So my teacher gave me the task to solve it for tomorrow but there is no possible way I can do it
So here it is:
Along the circular road,there are N cities and in every city has it's own shop for appliances. You know (enter) the price of each fridge and the price of the trip (two-way ticket). For citizens of each city determinate the city in which they can find the cheapest fridge plus the smallest price for tickets. Directions can be clockwise or counterclockwise.
Ticket: 4 3 4 10
Fridge: 5 10 7 10
For citizens of the first city: It's cheapest to go to the town 1.
For citizens of the second city: It's best to stay in their own city
For citizens of the the third city: It's best to stay in their own city
For citizens of the fourth city: It's best to go the town 1.
We came to arrays so no advanced techniques like pointers or functions are allowed.