返回列表 發帖
  1. using ConsoleApp1;
  2. using System;//程式庫呼叫
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq.Expressions;
  5. using ABC.qq;


  6. class Program//負責一部分工作的人
  7. {

  8.     static void Main()
  9.     {
  10.         try
  11.         {


  12.             List<string> lst = new List<string>();
  13.             string str = "";
  14.             while (true)
  15.             {
  16.                 str = Console.ReadLine();
  17.                 if (str != "999")
  18.                 {
  19.                     lst.Add(str);
  20.                 }
  21.                 else
  22.                 {
  23.                     break;
  24.                 }
  25.             
  26.             }
  27.             compute(lst);
  28.         } catch
  29.         {
  30.             Console.WriteLine("error");
  31.         }
  32.         Console.ReadKey();

  33.    

  34.     }
  35.     static void compute(List<string> lst)
  36.     {
  37.         Console.WriteLine("before:"+String.Join(" ",lst));
  38.         lst.Reverse();
  39.         Console.WriteLine("afer:" + String.Join(" ", lst));
  40.     }

  41. }
複製代碼
istak.teach2@gmail.com

TOP

返回列表