Click here to Skip to main content
15,892,965 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
riced24-Aug-11 6:58
riced24-Aug-11 6:58 
GeneralMessage Removed PinPopular
22-Aug-11 4:00
David198722-Aug-11 4:00 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
stephen.darling22-Aug-11 23:19
stephen.darling22-Aug-11 23:19 
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
Tom Chantler23-Aug-11 1:15
professionalTom Chantler23-Aug-11 1:15 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
Member 462161222-Sep-11 4:53
Member 462161222-Sep-11 4:53 
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
Paulo_JCG23-Aug-11 2:09
professionalPaulo_JCG23-Aug-11 2:09 
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
Member 798954823-Aug-11 4:07
Member 798954823-Aug-11 4:07 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
Michael A. Cochran23-Aug-11 4:41
Michael A. Cochran23-Aug-11 4:41 
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
lucien6423-Aug-11 4:56
professionallucien6423-Aug-11 4:56 
AnswerRe: How do I generate a number divisable by 5, and check it? [modified] PinPopular
Michael A. Cochran23-Aug-11 4:56
Michael A. Cochran23-Aug-11 4:56 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
stephen.darling23-Aug-11 5:38
stephen.darling23-Aug-11 5:38 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
Chris Maunder23-Aug-11 6:24
cofounderChris Maunder23-Aug-11 6:24 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
stephen.darling23-Aug-11 6:56
stephen.darling23-Aug-11 6:56 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
Michael A. Cochran23-Aug-11 6:32
Michael A. Cochran23-Aug-11 6:32 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
stephen.darling23-Aug-11 7:00
stephen.darling23-Aug-11 7:00 
GeneralMandatory XKCD reference Pin
jsc4224-Aug-11 1:23
professionaljsc4224-Aug-11 1:23 
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
Vite Falcon23-Aug-11 7:28
Vite Falcon23-Aug-11 7:28 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
Michael A. Cochran23-Aug-11 9:17
Michael A. Cochran23-Aug-11 9:17 
GeneralRe: How do I generate a number divisable by 5, and check it? Pin
fuximus23-Aug-11 15:40
fuximus23-Aug-11 15:40 
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
KP Lee23-Aug-11 8:54
KP Lee23-Aug-11 8:54 
You are getting all sorts of advice. Multiplying by 10 can result in overflow. The easiest is: num -= num%5;
IE subtract the remainder if you divided by five from the result.

Another way: num = (num/5) * 5;

That will NEVER cause an overflow in most languages. If you are using vb.net, besides the syntax replace "/" with "\".
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
vaibhav9223-Aug-11 19:34
vaibhav9223-Aug-11 19:34 
AnswerRe: How do I generate a number divisable by 5, and check it? Pin
lukeer23-Aug-11 22:40
lukeer23-Aug-11 22:40 
QuestionC# .net mass emailer Pin
markymark8222-Aug-11 3:38
markymark8222-Aug-11 3:38 
AnswerRe: C# .net mass emailer Pin
jschell22-Aug-11 9:24
jschell22-Aug-11 9:24 
GeneralRe: C# .net mass emailer Pin
markymark8222-Aug-11 22:15
markymark8222-Aug-11 22:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.