Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- class Deck52Cards
- {
- static void Main()
- {
- Console.OutputEncoding = Encoding.Unicode;
- Console.Title = "Print a Deck of 52 Cards";
- Console.WriteLine("This program will print all possible 52 cadrs from a deck.");
- char clubs = '\u2663';
- char spades = '\u2660';
- char diamonds = '\u2666';
- char hearts = '\u2665';
- char[] arrSym = new char[] { clubs,spades,diamonds,hearts};
- char[] arrChar = new char[] { 'A','J','Q','K'};
- for (int deck = 2; deck <= 10; deck++)
- {
- for (int hand = 0; hand < arrSym.Length; hand++)
- {
- Console.Write("{0}{1} ",deck,(char)arrSym[hand]);
- }
- Console.WriteLine();
- }
- for (int i = 0; i < arrChar.Length; i++)
- {
- for (int k = 0; k < arrSym.Length; k++)
- {
- Console.Write("{0}{1} ",arrChar[i],arrSym[k]);
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement