Click here to Skip to main content
       

Algorithms

 
GeneralRe: Specify numbers as product of Primes? PinmemberThe Developer8-Aug-08 8:03 
GeneralRe: Specify numbers as product of Primes? PinmemberIan Uy26-Jun-08 7:28 
GeneralRe: Specify numbers as product of Primes? PinmemberPaul Conrad28-Jun-08 6:44 
GeneralRe: Specify numbers as product of Primes? PinmemberIan Uy28-Jun-08 6:46 
GeneralRe: Specify numbers as product of Primes? PinmemberPaul Conrad28-Jun-08 7:11 
GeneralRe: Specify numbers as product of Primes? PinmemberRavi Bhavnani8-Aug-08 8:16 
GeneralRe: Specify numbers as product of Primes? Pinmembercp987628-Jun-08 21:27 
GeneralRe: Specify numbers as product of Primes? PinmvpLuc Pattyn29-Jun-08 3:42 
Hi,
 
one remark: you should replace the if(){} construct by a while(){} and drop the i--;
that way your code is more readable, and you can now more easily reduce the divisor candidates
(say to only 2 and odd numbers, or just primes, or whatever else has already been suggested).
 
Smile | :)
 
Luc Pattyn [Forum Guidelines] [My Articles]

Voting for dummies? No thanks. Dead | X|


GeneralRe: Specify numbers as product of Primes? PinmemberMarkBrock27-Jun-08 19:46 
GeneralRe: Specify numbers as product of Primes? PinmemberPaul Conrad28-Jun-08 6:42 
GeneralRe: Specify numbers as product of Primes? PinmemberChandraRam2-Jul-08 23:49 
GeneralRe: Specify numbers as product of Primes? PinmemberMarkBrock3-Jul-08 0:06 
AnswerRe: Specify numbers as product of Primes? PinmemberMember 419459326-Jun-08 9:19 
GeneralRe: Specify numbers as product of Primes? PinmemberRobert.C.Cartaino26-Jun-08 9:47 
GeneralRe: Specify numbers as product of Primes? PinmemberIan Uy26-Jun-08 18:51 
GeneralRe: Specify numbers as product of Primes? Pinmembercp987629-Jun-08 15:57 
AnswerRe: Specify numbers as product of Primes? PinmemberArash Partow29-Jun-08 1:48 
GeneralRe: Specify numbers as product of Primes? [modified] Pinmembercp987629-Jun-08 4:53 
GeneralRe: Specify numbers as product of Primes? PinmvpLuc Pattyn29-Jun-08 5:40 
GeneralRe: Specify numbers as product of Primes? Pinmembercp987629-Jun-08 15:47 
GeneralRe: Specify numbers as product of Primes? PinmemberArash Partow30-Jun-08 3:54 
GeneralRe: Specify numbers as product of Primes? Pinmembercp987630-Jun-08 4:18 
GeneralRe: Specify numbers as product of Primes? PinmemberArash Partow30-Jun-08 5:27 
GeneralRe: Specify numbers as product of Primes? PinmemberArash Partow30-Jun-08 3:17 
Questionlogic of prob function in ms excel Pinmembersumit703425-Jun-08 1:40 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 19 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid