Fruit Shop(Complex Conditional Statements)
Здравейте, проблема е там, че в .NET Fiddle кода върви идеално, а когато го пусна в джъджа, кодът се чупи. Някой има ли идея къде е проблема?
using System;
                    
public class Program
{
    public static void Main()
    {
        var fruit=Console.ReadLine();
        var dow=Console.ReadLine();
        var kstvo=double.Parse(Console.ReadLine());
        double price= -1.00;
        
        if (dow=="Monday" ||dow=="Tuesday" ||dow=="Wednesday" ||dow=="Thursday" || dow=="Friday" )
        {
            if( fruit=="banana") price = 2.50;
            else if( fruit=="apple") price=1.20;
            else if( fruit=="orange") price=0.85;
            else if( fruit=="grapefruit") price=1.45;
            else if( fruit=="kiwi") price=2.70;
            else if( fruit=="pineapple") price=5.50;
            else if( fruit=="grapes") price=3.85;
                
        }
        else if (dow=="Saturday" ||dow=="Sunday")
        {
            if( fruit=="banana") price = 2.70;
            else if( fruit=="apple") price=1.25;
            else if( fruit=="orange") price=0.90;
            else if( fruit=="grapefruit") price=1.60;
            else if( fruit=="kiwi") price=3.00;
            else if( fruit=="pineapple") price=5.60;
            else if( fruit=="grapes") price=4.20;
        }
        
        if (price>=0)
        {
        Console.WriteLine("{0:f2}", kstvo * price);
        }
        else
        {
        
            Console.WriteLine("error");
        }
        
    }
    
    
    
    }