Computer Science, asked by TulwaSahota, 1 year ago

Alice and Bob are very happy as they got many pumpkins from their farm.Now both of them decides to sell the pumpkin's.Before selling the pumpkins they need to find out how much money they will get by selling these pumpkins.They came to knew from one of their friend that all the shops in code city use the same strategy for calculating the price.The strategy is that if the pumpkin weights, W kilos and if it can be divided into two parts such that the weight of both the parts is an even number then that pumpkin is given an amount of 50.Please help Bob and Alice by writing a computer program to find out the total amount they will get when they sell these pumpkin's.


akshayegreat: just an osum and complicated question....
akshayegreat: i can try...

Answers

Answered by akshayegreat
0
void main(int wt,int no)
    {int half=no/2,price=0;
        if(half%2==0)
        {
            price=50;
        }
        int net=no*price;
    }


Similar questions