Skip to content

Instantly share code, notes, and snippets.

@sguzunov
Created April 17, 2016 15:03
Show Gist options
  • Save sguzunov/a55c682fc318cdbc4e35cca8d8e40355 to your computer and use it in GitHub Desktop.
Save sguzunov/a55c682fc318cdbc4e35cca8d8e40355 to your computer and use it in GitHub Desktop.
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