Click here to Skip to main content
15,918,333 members
Home / Discussions / C#
   

C#

 
GeneralRe: FEATURE_BROWSER_EMULATION for Class Addin Pin
BillWoodruff3-Jan-15 15:35
professionalBillWoodruff3-Jan-15 15:35 
QuestionSearch options Database Pin
rattlerrFx3-Jan-15 6:38
rattlerrFx3-Jan-15 6:38 
AnswerRe: Search options Database Pin
DamithSL3-Jan-15 14:55
professionalDamithSL3-Jan-15 14:55 
GeneralRe: Search options Database Pin
rattlerrFx3-Jan-15 15:15
rattlerrFx3-Jan-15 15:15 
QuestionProblem sending bulk mails with multiple attachments. Pin
Member 108281323-Jan-15 5:09
Member 108281323-Jan-15 5:09 
AnswerRe: Problem sending bulk mails with multiple attachments. Pin
Richard MacCutchan3-Jan-15 5:17
mveRichard MacCutchan3-Jan-15 5:17 
QuestionEmailing Image To Tumblr Pin
JBHowl3-Jan-15 1:12
JBHowl3-Jan-15 1:12 
AnswerRe: Emailing Image To Tumblr Pin
DamithSL3-Jan-15 1:31
professionalDamithSL3-Jan-15 1:31 
GeneralRe: Emailing Image To Tumblr Pin
JBHowl3-Jan-15 1:45
JBHowl3-Jan-15 1:45 
SuggestionRe: Emailing Image To Tumblr Pin
Richard MacCutchan3-Jan-15 1:54
mveRichard MacCutchan3-Jan-15 1:54 
AnswerRe: Emailing Image To Tumblr Pin
JBHowl3-Jan-15 3:56
JBHowl3-Jan-15 3:56 
GeneralRe: Emailing Image To Tumblr Pin
Richard MacCutchan3-Jan-15 5:15
mveRichard MacCutchan3-Jan-15 5:15 
GeneralRe: Emailing Image To Tumblr Pin
Dave Kreskowiak3-Jan-15 8:24
mveDave Kreskowiak3-Jan-15 8:24 
GeneralRe: Emailing Image To Tumblr Pin
JBHowl5-Jan-15 4:19
JBHowl5-Jan-15 4:19 
GeneralRe: Emailing Image To Tumblr Pin
Dave Kreskowiak5-Jan-15 4:41
mveDave Kreskowiak5-Jan-15 4:41 
GeneralRe: Emailing Image To Tumblr Pin
JBHowl6-Jan-15 3:43
JBHowl6-Jan-15 3:43 
AnswerRe: Emailing Image To Tumblr Pin
JBHowl10-Jan-15 2:48
JBHowl10-Jan-15 2:48 
QuestionTrouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 0:46
Mandelnuss3-Jan-15 0:46 
AnswerRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Richard MacCutchan3-Jan-15 0:57
mveRichard MacCutchan3-Jan-15 0:57 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 1:18
Mandelnuss3-Jan-15 1:18 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Richard MacCutchan3-Jan-15 1:50
mveRichard MacCutchan3-Jan-15 1:50 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 3:53
Mandelnuss3-Jan-15 3:53 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Richard MacCutchan3-Jan-15 4:46
mveRichard MacCutchan3-Jan-15 4:46 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 5:20
Mandelnuss3-Jan-15 5:20 
QuestionLogic of prime numbers Pin
Member 113371082-Jan-15 12:44
Member 113371082-Jan-15 12:44 
C#
if (value % 2 == 0) { x++; break; }
if (value % i == 0) { x++; break; }


Heres my problem with this. I am not understanding the logic and I need help with this. I would really appreciate your feedback.

Just as an example.
suppose i input value=5
i is going to check 1,3,5.
so 5%1= Remainder 0
5%3= Remainder 2
5%5= Remainder 0
Well since 5%3 has a remainder, doesnt this disqualify it? Obviously we all know that five is a prime number but what is the computer checking with the module??

Thank you guys so much and I hope you guys can teach me the logic behind this.

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.