The Dink Network

Reply to Modulo

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 11th 2006, 01:44 PM
goblins.gif
Neo
Peasant He/Him Poland
He Who Would Steal The Flame Must Die 
Is there any other (more ellegant) way to find the modulo of a number (to be exact, to find if a number is dividable by X) than making something like that:

int &number = 632;
int &temp = &number / 3;
&temp = &temp * 3;
if (&temp == &number)
{
blahblah
}

...?