Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Math Stumper

Status
Not open for further replies.

SWarrior

MIS
Dec 19, 2003
111
US
I need to get the Remainder of a division answer.

For example, 48 / 7 = 6, remainder 6. Because 7 * 6 = 42 and then there is 6 left over. I need the 6.

51 / 7 = 7, remainder 2
and so on.

-SWarrior
 
Nevermind... worked it out this way...

Code:
Remainder = F - (int(f/7)*7)

-SWarrior
 
There's a built in function for doing this:

Remainder = F [red]Mod[/red] 7

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top