NMDanny

Basket

Jan 2nd, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1.  
  2.             int numplayer, score, sum = 0;
  3.             int[] scoreType = new int[3];
  4.             int[] players = new int[5];
  5.             for (int i = 0; i < 5; ++i)
  6.                 players[i] = 0;
  7.             for (int i = 0; i < 3; ++i)
  8.                 scoreType[i] = 0;
  9.             Console.Write("Enter the number of the player:");
  10.             numplayer = int.Parse(Console.ReadLine());
  11.             while (numplayer != 0)
  12.             {
  13.                 Console.Write("Enter the scoreType");
  14.                 score = int.Parse(Console.ReadLine());
  15.                 players[numplayer - 1] += score;
  16.                 scoreType[score - 1]++;
  17.                 sum += score;
  18.                 Console.WriteLine("enter num of player:");
  19.                 numplayer = int.Parse(Console.ReadLine());
Advertisement
Add Comment
Please, Sign In to add comment