# [thelist] mod (%) help

Marianela Queme mqueme at gmail.com
Fri Jul 18 17:59:32 CDT 2008

```try:

if(wheelqty>=4){
givediscount=true;
extraWheels=wheelqty -4;
}else{
givediscount=false;
extraWheels=wheelqty;
}

On Thu, Jul 17, 2008 at 7:16 AM, Luther, Ron <Ron.Luther at hp.com> wrote:

> Brian Cummiskey asked a fun math question!
>
> >>a kit consists of a lift and 4 wheels.
> >>When a complete kit is there, all is well and a discount is applied.
>
>
> Hi Brian,
>
>
> Ooooo!  Math for breakfast!  Yummy!  Okay, how about this:
>
> Number of Discounts = min(number of lifts, number of groups of 4 wheels)
>
> Number of groups of 4 wheels = ((number of wheels ordered) - (number of
> wheels ordered mod 4)) / 4
>
>
> Price Paid = Total Lift Price + Total Wheel Price
>
> Total Lift Price = (Number of discounts) * (Discounted lift price) +
> ((Number of lifts ordered) - (Number of discounts)) * (Full lift price)
>
> Total Wheel Price = (Number of discounts) * (Discounted wheel price) * 4
> {Cuz there is 4 wheels in a 'discount group'} + (number of wheels ordered
> mod 4) * (Full wheel price)
>
>
> I think that should work for ya!
>
>
> Good Luck!
> RonL.
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>

--
Marianela Queme
Guatemala
"Life is beautiful"

```