Advertisement
patrik5

Print a Deck of 52 Cards

Mar 23rd, 2014
1,722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. using System;
  2.  
  3. class PrintDeckOf52Cards
  4. {
  5. static void Main()
  6. {
  7. // Console.WriteLine( "Enter card number");
  8. // int card=int.Parse(Console.ReadLine());
  9. int a = 3;
  10. int b = 4;
  11. int c = 5;
  12. int d = 6;
  13. // Console.WriteLine((char) a);
  14. for (int i = 2; i < 15; i++)
  15. {
  16. if (i > 1 && i < 11)
  17. {
  18. Console.WriteLine(" " + ((char)a) + i + " " + ((char)b) + i + " " + ((char)c) + i + " " + ((char)d) + i);
  19.  
  20. }
  21. else
  22. {
  23. for (int j = i; j < i + 1; j++)
  24. switch (i)
  25. {
  26. case 11: Console.WriteLine((char)a + "D " + (char)b+"D " + ((char)c) + "D " + ((char)d) + "D " ); break;
  27. case 12: Console.WriteLine((char)a + "A " + (char)b + "A "+(char)c + "A " + ((char)d) + "A " ); break;
  28. case 13: Console.WriteLine((char)a + "J " + (char)b + "J " + (char)c + "J " + ((char)d) + "J "); break;
  29. case 14: Console.WriteLine((char)a + "K " + (char)b + "K " + (char)c + "K " + ((char)d) + "K "); break;
  30. }
  31. }
  32. }
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement