الاثنين، 22 أكتوبر 2018

using System;



using System.Collections.Generic;



using System.Linq;



using System.Text;



using System.Threading.Tasks;




namespace ConsoleApplication2
{



    class Program
    {


        static void Main(string[] args)
        {


            int a, c, b;

            int e = 0;
            int y = 0;
            int x = 0;
            int num = 1;

            while (num++ < 5)
            {


                Console.WriteLine("plz enter the first num  ");



                a = int.Parse(Console.ReadLine());

                Console.WriteLine("plz enter  the second num  ");



                b = int.Parse(Console.ReadLine());




                if (a > b)
                {
                    Console.WriteLine("the first num bigger than the second num  ");
                  
                    e++;

                }




                else if (a == b)
                {
                    Console.WriteLine("the first num equel the second num  ");
                    
                    x++;

                }


                else
                {
                    Console.WriteLine("the second num bigger than the first num  ");
                 

                    y++;

                }


            }


            Console.WriteLine("the times that a>b = " + e);
            Console.WriteLine("the times that a<b = " + y);
            Console.WriteLine("the times that a=b = " + x);
            Console.ReadKey();
        }


    }
}

ليست هناك تعليقات:

إرسال تعليق