Advertisement
vlad0

Loops - Card Deck

Dec 6th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2.  
  3.     class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             string[] cards = { "", "", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace", };
  8.             string[] colours = { "Spades", "Clubs", "Diamonds", "Hearts", };
  9.  
  10.             for (int i = 0; i < 4; i++)
  11.             {
  12.                 Console.WriteLine("\n\n");
  13.                 for (int j = 2; j < 15; j++)
  14.             {
  15.              Console.Write("{0} {1}, ", cards[j], colours[i]);
  16.             }
  17.             }
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement