Robot Barman in C# Intermediate
Problem You have a robot-barman and his goal is to neatly arrange drinks on the shelves of the bar. He is very smart and takes as many drinks as necessary to evenly distribute them on the shelves, but still has problems with division. The program installed in the robot takes the number of drinks: by dividing the number of drinks by the number of shelves and outputting the result. The program must, also, handle those two, possible problems: 1. The divider (the number of shelves) should never be zero 2. Both inputs should be integers. For the first exception, the program should output "At least 1 shelf", and, for the second, "Please insert an integer". Sample Input 6 two Sample Output Please input an integer For Your Information Use DivideByZeroException for the first exception and FormatException for the second exception. Note: What's not added in my code is the test for the number of shelves should never be zero hoping that DivideByZeroException will catch it but doesn't, possibly.