Advertisement
Guest User

week 1 task 7

a guest
Jan 16th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int player, teamsize;
  14.             Console.WriteLine("please enter number of players?");
  15.             player = Convert.ToInt16(Console.ReadLine());
  16.             Console.WriteLine("please enter size of teams?");
  17.             teamsize = Convert.ToInt16(Console.ReadLine());
  18.  
  19.             int result = player / teamsize;
  20.             int remainder = player % teamsize;
  21.  
  22.             Console.WriteLine("you can have " + result + " with the ammount of remaining players being " + remainder);
  23.             Console.ReadKey();
  24.                        
  25.         }
  26.        
  27.          
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement