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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

r%s function

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need some clarification on the r%s function. I know that I am requesting the remainder of a division function.
 
If I understand correctly, the % modulus operation is what your question is about. Think back to elementary school division when you did
------
9| 10 = 1 1/9

10 % 9 = 1 it is the remainder of the operation.

you could also look at is as

x%y = x-((int)(x/y)*y)
10%9 = 10-(1)*9 = 1;

Dont know if this clarified it.

matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top