Console.WriteLine("请你输入天数。");
string strDay = Console.ReadLine();
int day=Convert.ToInt32(strDay);
double week = day / 7;
int Day = day % 7;
Console.WriteLine("{0}是{1}周和{2}天", strDay,week,Day);
Console.ReadKey();
###实际效果图:
Console.WriteLine("请你输入天数。");
string strDay = Console.ReadLine();
int day=Convert.ToInt32(strDay);
double week = day / 7;
int Day = day % 7;
Console.WriteLine("{0}是{1}周和{2}天", strDay,week,Day);
Console.ReadKey();
###实际效果图: