效果
代码
Console.WriteLine("天数");
string str_day = Console.ReadLine();
int day = Convert.ToInt32(str_day);
int zhou = day / 7;
int tian = day % 7;
Console.WriteLine("这个天数是第{0}周", zhou);
Console.WriteLine("这个天数是第{0}天", tian);
Console.ReadKey();
Console.WriteLine("天数");
string str_day = Console.ReadLine();
int day = Convert.ToInt32(str_day);
int zhou = day / 7;
int tian = day % 7;
Console.WriteLine("这个天数是第{0}周", zhou);
Console.WriteLine("这个天数是第{0}天", tian);
Console.ReadKey();