Advertisement
remote87

Check For a Play Card

Sep 2nd, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _03.CheckForPlayCard
  8. {
  9.     class CheckForPlayCard
  10.     {
  11.         static void Main()
  12.         {
  13.             string[] cardFace = new string[] { "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A" };
  14.             Console.Write("Enter a value for the card face: ");
  15.             string input = Console.ReadLine().ToUpper();
  16.             Console.WriteLine(cardFace.Contains(input) ? "Yes":"No");
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement