samedi 28 novembre 2015

How will I know how much Ink I used based on the total papers used

So I wanted to make an IF statement where it will return the total Ink consumption based on the papers used.

One (1) box of Ink = 9,600 papers

What will be the right logic for this?

Here is my Code:

           if($total_papers <= 9600){
                //the number of box will increment
                //so if the total is    19,200 it should return 2 boxes.

            }else{ //not more than 1 box }

Aucun commentaire:

Enregistrer un commentaire