Exemplo n.º 1
0
        public static void div()
        {
            input_data data = new input_data();

            data.data();

            Console.WriteLine("The Division of {0} & {1} is =  {2} ", data.data1, data.data2, data.data1 / data.data2);
            Console.ReadLine();
        }
Exemplo n.º 2
0
        public static void add()
        {
            input_data data = new input_data();

            data.data();

            Console.WriteLine("The Addition of {0} & {1} is =  {2} ", data.data1, data.data2, data.data1 + data.data2);
            Console.ReadLine();
        }
Exemplo n.º 3
0
        public static void triangle()
        {
            input_data data = new input_data();

            data.data();
            decimal area = Convert.ToDecimal(data.data1 * data.data2) / 2;

            //  double area1 = (data.data1 * data.data2) / 2;
            Console.WriteLine("the are of the triangle is {0}", area);
        }
Exemplo n.º 4
0
        public static void circle()
        {
            input_data data = new input_data();

            data.data();
            double pi     = 3.14;
            double radius = data.data1;
            double area   = pi * (radius * radius);

            Console.WriteLine("The Area (A=πr2) of your circle is: {0:0.00}", area);
        }
        public static void rectangle()
        {
            input_data data = new input_data();

            data.data();

            double area      = data.data1 * data.data2;
            double perimeter = 2 * (data.data1 + data.data2);

            Console.WriteLine("The AREA of your rectangle is: {0}", area);
            Console.WriteLine("The PERIMETER of your rectangle is: {0}", perimeter);
            Console.ReadLine();
        }
Exemplo n.º 6
0
        public static void sub()
        {
            //Console.WriteLine("enter the number");
            //var sub1 = Console.ReadLine();
            //Console.WriteLine("enter the second number");
            //var sub2 = Console.ReadLine();
            input_data data = new input_data();

            data.data();


            Console.WriteLine("The substration of {0} & {1} is =  {2} ", data.data1, data.data2, data.data1 - data.data2);
            Console.ReadLine();
        }