#作業(yè)要求:讓用戶輸入天數(shù),并計算這個天數(shù)是幾周零幾天,比如46天是6周零4天
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication8
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? Console.WriteLine("請輸入天數(shù)");
? ? ? ? ? ? string strday = Console.ReadLine();
? ? ? ? ? ? int day = Convert.ToInt32(strday);
? ? ? ? ? ? int week = day / 7;
? ? ? ? ? ? int days = day % 7;
? ? ? ? ? ? Console.WriteLine("第{0}周,星期{1}", week, days);
? ? ? ? ? ? Console.ReadKey();
? ? ? ? }
? ? }
}
