问题描述
publicvoidMethod(DayOfWeekday){switch(day){caseDayOfWeek.Monday:Console.WriteLine("TodayisMonday!");break;caseDayOfWeek.Tuesday:Console.WriteLine("TodayisTuesday!");break;caseDayOfWeek.Wednesday:Console.WriteLine("TodayisWednesday!");break;caseDayOfWeek.Thursday:Console.WriteLine("TodayisThursday!");break;caseDayOfWeek.Friday:Console.WriteLine("TodayisFriday!");break;caseDayOfWeek.Saturday:Console.WriteLine("TodayisSaturday!");break;caseDayOfWeek.Sunday:Console.WriteLine("TodayisSunday!");break;}}}
请问以上程序的环形复杂度为多少?MSDN上给出的是4,但不知如何得来.
解决方案
解决方案二:
路过帮顶=============11月6日,论坛升级公告,积分已经做了调整!http://topic.csdn.net/u/20081107/11/b27dc75f-14b1-4594-9de3-5b18d9e36a11.html此次调整增加了两个新的可用分获取渠道:1:帖子被推荐(加精)后,帖主可以获得88分的可用分奖励;2:帖子结帖后会返还帖主50%的悬赏分,无满意结帖不返还分数;3:接下来会不断增加新的可用分获取途径,比如参与活动赠送等,请大家多关注;