Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication23
- {
- class Program
- {
- static int capasitya(int a, int b)
- {
- int c;
- c = b / a + 1;
- if ((b % a) == 0)
- c++;
- return c;
- }
- static int capasityb(int a, int b)
- {
- int c;
- c = b / a+ 1;
- if ((b % a) == 0)
- c++;
- return c;
- }
- static int capasityc(int a, int b)
- {
- int c;
- c = b / a + 1;
- if ((b % a) == 0)
- c++;
- return c;
- }
- static void Main(string[] args)
- {
- int guests, bussesc, boatsc, tablesc, busses, boats, tables;
- Console.WriteLine("How many guests did you invited?");
- guests = int.Parse(Console.ReadLine());
- Console.WriteLine("What is the busses capasity?");
- bussesc = int.Parse(Console.ReadLine());
- Console.WriteLine("what is the boats capasity?");
- boatsc = int.Parse(Console.ReadLine());
- Console.WriteLine("what is the tables capasity?");
- tablesc = int.Parse(Console.ReadLine());
- busses = capasitya(bussesc, guests);
- boats = capasityb(boatsc, guests);
- tables = capasityc(tablesc, guests);
- Console.WriteLine("You need:");
- Console.WriteLine(busses + " busses.");
- Console.WriteLine(boats + " boats.");
- Console.WriteLine(tables + " tables.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement