Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace prac_3_ex_1
- {
- class Program
- {
- static string Fun(int cardNumber)
- {
- switch (cardNumber)
- {
- case 6:
- return "шестерка";
- case 7:
- return "семерка";
- case 8:
- return "восьмерка";
- case 9:
- return "девятка";
- case 10:
- return "десятка";
- case 11:
- return "валет";
- case 12:
- return "дама";
- case 13:
- return "король";
- default:
- return "туз";
- }
- }
- static void Main(string[] args)
- {
- Console.Write("Введите номер карты: ");
- int cardNumber = int.Parse(Console.ReadLine());
- Console.WriteLine("Достоинство карты: " + Fun(cardNumber));
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement