using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 老狼老狼_几点了 { class Program { static void Main(string[] args) { while(true) { Console.Write("老狼老狼,几点了"); string s = Console.ReadLine(); int hour =Convert.ToInt32(s); if (hour>0&&hour<6) { Console.WriteLine("凌晨"+s+"点"); } if (hour > 6 && hour < 12) { Console.WriteLine("早上" + hour + "点"); } if (hour > 12 && hour < 18) { hour = hour - 12; Console.WriteLine("下午" + hour + "点"); } if (hour > 18 && hour < 24) { hour = hour - 12; Console.WriteLine("晚上" + hour + "点"); } else { Console.WriteLine("无法识别的时间"); } Console.ReadLine(); } } } }