archangelmihail

All Cards

Nov 26th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 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 _10.PrintAllCards
  8. {
  9. class PrintAllCards
  10. {
  11. static void Main(string[] args)
  12. {
  13. string[] suits = new string[4] { "Spades", "Hearts", "Diamonds", "Clubs" };
  14. foreach (string suit in suits)
  15. {
  16. for (int card = 2; card <= 14; card++)
  17. {
  18. switch (card)
  19. {
  20. case 2: Console.WriteLine("2 of {0}", suit); break;
  21. case 3: Console.WriteLine("3 of {0}", suit); break;
  22. case 4: Console.WriteLine("4 of {0}", suit); break;
  23. case 5: Console.WriteLine("5 of {0}", suit); break;
  24. case 6: Console.WriteLine("6 of {0}", suit); break;
  25. case 7: Console.WriteLine("7 of {0}", suit); break;
  26. case 8: Console.WriteLine("8 of {0}", suit); break;
  27. case 9: Console.WriteLine("9 of {0}", suit); break;
  28. case 10: Console.WriteLine("10 of {0}", suit); break;
  29. case 11: Console.WriteLine("Jack of {0}", suit); break;
  30. case 12: Console.WriteLine("Queen of {0}", suit); break;
  31. case 13: Console.WriteLine("King of {0}", suit); break;
  32. case 14: Console.WriteLine("Ace of {0}", suit); break;
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment