分享

宿舍值日

 天涯1990 2010-11-12
using System;
public class OnDuty
{
 public static void Main()
 {
  int today;
        do
  {
   Console.WriteLine ("Please input what day it is today:\n\n1 2 3 4 5 6 7 will be ok.and -1 is quit");
   today=int.Parse (Console.ReadLine ());
   switch(today)
   {
    case 1:
     Console.WriteLine ("\nA is on duty today.He must make our room cleanly.");
     break;
    case 2:
     Console.WriteLine ("\nB is on duty today.He msut make our room cleanly.");
     break;
    case 3:
     Console.WriteLine ("\nC is on duty today.He msut make our room cleanly.");
     break;
    case 4:
     Console.WriteLine ("\nD is on duty today.He must make our room cleanly.");
     break;
    case 5:
     Console.WriteLine ("\nE is on duty today.He msut make our room cleanly.");
     break;
    case 6:
     Console.WriteLine ("\nF is on duty today.He must make our room cleanly.");
     break;
    case 7:
     Console.WriteLine ("\nG is on duty today.He must make our room cleanly.");
     break;
    case -1:
     break;
    default:
     Console.WriteLine ("Invalid input.Please retry:");
     break;
   }
  }while(today!=-1);
 }
}

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多