Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class CheckForAPlayCard
- {
- static void Main()
- {
- Console.WriteLine("Enter a string to check whether it's a play card sign.");
- string userInput = Console.ReadLine();
- switch (userInput)
- {
- case "2":
- case "3":
- case "4":
- case "5":
- case "6":
- case "7":
- case "8":
- case "9":
- case "10":
- case "J":
- case "j":
- case "Q":
- case "q":
- case "K":
- case "k":
- case "A":
- case "a":
- {
- Console.WriteLine("{0} is a valid play card sign.", userInput);
- break;
- }
- default:
- {
- Console.WriteLine("{0} is not a valid play card sign.", userInput);
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement