Exemple #1
0
    static void Main(string[] args)
    {
        /*
        TempConverter tempconvert = new TempConverter();
        double fahrenheit = 35;
        double celcius = tempconvert.fahrenheitToCelscius(fahrenheit);
        Console.WriteLine("The temperature in celcius is " + celcius);
        */
        /*
        GrassCut cut1 = new GrassCut(10, 10, 4, 4, 2);
        double time = cut1.computeCuttingTime();
        Console.WriteLine("The time taken to cut the grass is " + time + " seconds");
        */
        double sum, diff, product;
        Floats floatObj = new Floats();

        Console.Write("Enter two floating point values.\nValue 1: ");
        floatObj.x = Convert.ToDouble(Console.ReadLine());
        Console.Write("Value 2: ");
        floatObj.y = Convert.ToDouble(Console.ReadLine());

        sum = floatObj.calculateSum();
        diff = floatObj.calculateDifference();
        product = floatObj.calculateProduct();

        Console.WriteLine("The sum is " + sum + "\nThe difference is " + diff + "\nThe prodcut is " + product);
    }