Exemple #1
0
Fichier : JSQ.cs Projet : wy-all/wy
 public void Equals(JSQ num)
 {
     if (num.num1 == num.num2)
     {
         Console.WriteLine("两数相等");
     }
 }
Exemple #2
0
        static void Main(string[] args)
        {
            JSQ   jsq = new JSQ();
            float a = 0, b = 0;

            Console.WriteLine("请输入表达式,输入一个字符按一下回车!!!");
            while (true)
            {
                jsq.Num1 = Console.ReadLine();
                string input3 = Console.ReadLine();
                jsq.Num2 = Console.ReadLine();


                try
                {
                    a      = float.Parse(jsq.Num1);
                    b      = float.Parse(jsq.Num2);
                    jsq.Fh = char.Parse(input3);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
                jsq.Equals(jsq);
                jsq.Operators();
                jsq.Operators(a, b);

                Console.WriteLine("请继续!!");
            }
        }