请用户输入年份,输入月份,输出该月份天数



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 练习1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入年份:");
            int year = int.Parse(Console.ReadLine());
            Console.Write("请输入月份");
            int month = int.Parse(Console.ReadLine());
            switch (month)
            {
                case 1:
                case 3:
                case 5:
                case 7:
                case 8:
                case 10:
                case 12:
                    Console.WriteLine("31天");
                    break;
                case 2:
                    if (year % 400 == 0 || (year % 4 =

你可能感兴趣的:(请用户输入年份,输入月份,输出该月份天数)