- using System;
- namespace 日期
- {
- class Progam
- {
- static void Main(string[] args)
- {
- int days;
- Console.WriteLine("请输入想要查询的天数。");
- days = Convert.ToInt32(Console.ReadLine());
- int week = days / 7;
- int day = days % 7;
- Console.WriteLine("{0}天中有{1}周零{2}天", days, week, day);
- Console.ReadKey();
- }
- }
- }
复制代码 |