cannot declare a body because it is marked abstract

Use virtual instead of abstract when you have a default implementation but would like to allow sub-classes to override

 you can't declare a body for an abstract function of an abstract class.

You need to create another class herited from your abstract class that declare the body you want.

abstract class Cake
{
    public string _flavor, _size;
    public int _quantity;
    abstract public double Compute();
}

class BirthdayCake : Cake
{
    public int _numOfCandles;


    public BirthdayCake(string flavor, string size, int quantity, int numOfCandles):base(flavor,size,quantity)
    {
        _numOfCandles = numOfCandles;
    }

    public override double Compute()
    {
        //does your stuff
    }
}