Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 11. Write a program that prints all possible cards from a standard deck of 52 cards (without jokers).
- // The cards should be printed with their English names. Use nested for loops and switch-case.
- using System;
- namespace ex10
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] ranks = { "Ace", "Two", "Three", "Four", "Five", "Six", "Seven",
- "Eight", "Nine", "Ten", "Jack", "Queen", "King" };
- string[] colors = { "Clubs", "Diamonds", "Hearts", "Spades" };
- foreach (var rank in ranks)
- {
- foreach (var color in colors)
- {
- Console.WriteLine("{0} of {1}", rank, color);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment