I have to make a program that asks to enter the # of boxes bought. Then it should display the amount of the discount and the total cost of the purchase after the discount. Each box retails for $50. The problem I'm having is connecting the if else then function to the cost.

cout<<" Units sold: ";

cin>> cost;

cout<<"Total cost " << cost;

cost=(cost * 50);

discount = (50 - cost);

if (cost < 5)

cost=(cost * 50);

else if (cost > 5 && cost < 10);

cost=(50 - (50 * 0.2));

else if (cost > 10 && cost < 20)

cost=(50 - (50 * 0.3));

else if (cost > 20 && cost < 30)

cost=(50 - (50 * 0.4));

else if (cost > 30);

cost=(50 -(50 * 0.5));