I just need a push in the right direction for this one.(adsbygoogle = window.adsbygoogle || []).push({});

The problem is: A phone company charges this amount for the first minute and that amount for each additional minute. If someone talks for 3.1 minutes, they are charged for 4 minutes. Make a formula, blah blah blah...

Anyway I'm having trouble with making the equation work for both of these situations: when x is an integer, and when x is not an integer.

I already thought about int(x-.1) but then x could be .01, and it wouldn't be correct.

Any help is appreciated.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Greatest Integer Function Problem

**Physics Forums | Science Articles, Homework Help, Discussion**