Advertisement
Booster

Print All Playing Cards without Jokers

Jul 27th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2.  
  3. class PrintAllCardsWithoutJokers
  4. {
  5.     static void Main()
  6.     {   //52 cards: 4 colors by 13 cards (2 3 4 5 6 7 8 9 10 J Q K A)
  7.         //spade ♠, diamond ♦, club ♣, heart ♥
  8.  
  9.         string[] cardsColors = new string[4] { "♠", "♦", "♣", "♥" };
  10.         string[] cards = new string[13] { "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A" };
  11.  
  12.         for (int i = 0; i <= 3; i++)                            
  13.         {
  14.             Console.WriteLine("\n");          
  15.             for (int j = 0; j <= 12; j++)
  16.             {
  17.                 Console.Write("{0}{1} ", cardsColors[i], cards[j]);
  18.             }
  19.         }
  20.         Console.WriteLine("\n");
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement