Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int HowMuch(int people, string entity)
- {
- int numBus, numTable, numBoat;
- if (entity == "bus")
- {
- numBus = people/50;
- if (people % 50 != 0)
- numBus++;
- return numBus;
- }
- if (entity == "table")
- {
- numTable = people/10;
- if (people % 10 != 0)
- numTable++;
- return numTable;
- }
- if (entity == "boat")
- {
- ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement