コード例 #1
0
ファイル: Program.cs プロジェクト: kumbach/cctb145
        static void Main(string[] args)
        {
            Console.WriteLine("math expression: 123.45 X 67.89 = " + 123.45 * 67.89);

              HelloHelper helper = new HelloHelper();
              string name;
              for(;;)
              {
            Console.Write("Tell me a name: ");
            name = Console.ReadLine().Trim();
            if (name.Length == 0)
            {
              break;
            }
            helper.addPerson(name);
              };

              helper.sayHiToEveryone();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("math expression: 123.45 X 67.89 = " + 123.45 * 67.89);

            HelloHelper helper = new HelloHelper();
            string      name;

            for (;;)
            {
                Console.Write("Tell me a name: ");
                name = Console.ReadLine().Trim();
                if (name.Length == 0)
                {
                    break;
                }
                helper.addPerson(name);
            }
            ;

            helper.sayHiToEveryone();
        }