Created
April 17, 2016 15:03
-
-
Save sguzunov/a55c682fc318cdbc4e35cca8d8e40355 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Demo | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string cardFace = Console.ReadLine(); | |
string[] faces = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A" }; | |
string[] colors = { "spades", "clubs", "hearts", "diamonds" }; | |
int faceIndex = 0; | |
while (true) | |
{ | |
for (int i = 0; i < 4; i++) | |
{ | |
Console.Write("{0} of {1}", faces[faceIndex], colors[i]); | |
} | |
Console.WriteLine(); | |
if (faces[faceIndex] == cardFace) | |
{ | |
break; | |
} | |
faceIndex++; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment