General program explanation

We will take a look at a program I made for my intro to programing class

This specific program was made to calculate the prices of theoretically weather a city garbage plan was cheaper or a private one was cheaper

//calculate private company cost
privbags = (int)((trashgallons - privcontainercap)/privbagcap+0.99);
privcompanycost = privcontainerprice + (privbags * privbagprice);

//calculate city cost
lgcitybags = trashgallons/lgcitycap;
remaingallons = trashgallons % lgcitycap;
medcitybags = remaingallons/medcitycap;
remaingallons = trashgallons % medcitycap;
smallcitybags = (remaingallons/smallcitycap)+0.99;
citycost = lgcitybags * lgcityprice + medcitybags * medcityprice + smallcitybags * smallcityprice;

Above was how the program calculates the individual prices of the city plan and the private company plan.
I collected inputs from code not seen here things like trashgallons and every other variable is imputed by hand when the program runs.