rOSSybOY Posted January 25, 2006 Posted January 25, 2006 say i have a 5 digit number like 10001, and i divide it by 100, the result would be 100.01, a decimal, how would i divide it to get a remainder instead of a decimal?? Quote
Leaders snarfblam Posted January 25, 2006 Leaders Posted January 25, 2006 Use the modulus operator. Dim I As Int32 I = 10010 MessageBox.Show((I Mod 100).ToString()) ' Displays "10" int i; i = 10010; MessageBox.Show((I % 100).ToString()); // Displays "10" Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.