Exemplo n.º 1
0
    public static void Main(string[] args)
    {
        string[] m = { "pizza", "burger", "french fries" };
        Console.WriteLine("Enter the price of pizza");
        double localPrice = Convert.ToDouble(Console.ReadLine());

        Console.WriteLine("Enter the quantity of pizza");
        int localQuan = Convert.ToInt32(Console.ReadLine());
        //double localPrice = 500;
        //int localQuan = 10;
        Food s = new Food(localQuan, localPrice, m);

        //s.print_details();
        Console.WriteLine("\n The local meal Price is  "
                          + s.OldPrice);
        Console.WriteLine("\n The local meal Quantity is  "
                          + s.OldQuantity);
        MoreFunctions mf = new MoreFunctions();

        s.accept(mf);
        Console.WriteLine("New Price: "
                          + mf.newPrice());
        Console.WriteLine("New Quantity: "
                          + mf.newQuantity());
    }
Exemplo n.º 2
0
        private static double ComputePValue(double randomnessCoefficient, int blockNumber)
        {
            var K = coefficientKNs[blockNumber].Item1;

            double pValue = MoreFunctions.igamc(K / 2, randomnessCoefficient / 2);

            return(pValue);
        }