Click here to Skip to main content
12,999,744 members (42,510 online)

Algorithms

 
Questionlogic of prob function in ms excel Pin
sumit703425-Jun-08 0:40
membersumit703425-Jun-08 0:40 
QuestionFactorials Pin
Ian Uy24-Jun-08 8:17
memberIan Uy24-Jun-08 8:17 
AnswerRe: Factorials Pin
Tim Craig24-Jun-08 10:29
memberTim Craig24-Jun-08 10:29 
GeneralRe: Factorials Pin
Ian Uy25-Jun-08 6:32
memberIan Uy25-Jun-08 6:32 
GeneralRe: Factorials Pin
Tim Craig25-Jun-08 8:55
memberTim Craig25-Jun-08 8:55 
GeneralRe: Factorials Pin
Luc Pattyn25-Jun-08 11:01
mvpLuc Pattyn25-Jun-08 11:01 
GeneralRe: Factorials Pin
Tim Craig25-Jun-08 21:06
memberTim Craig25-Jun-08 21:06 
AnswerRe: Factorials Pin
cp987624-Jun-08 12:33
membercp987624-Jun-08 12:33 
AnswerRe: Factorials Pin
Matthew Butler24-Jun-08 12:38
memberMatthew Butler24-Jun-08 12:38 
GeneralRe: Factorials Pin
cp987624-Jun-08 14:05
membercp987624-Jun-08 14:05 
GeneralRe: Factorials Pin
Luc Pattyn24-Jun-08 15:02
mvpLuc Pattyn24-Jun-08 15:02 
GeneralRe: Factorials Pin
cp987624-Jun-08 20:09
membercp987624-Jun-08 20:09 
GeneralRe: Factorials Pin
Luc Pattyn24-Jun-08 23:53
mvpLuc Pattyn24-Jun-08 23:53 
GeneralRe: Factorials Pin
cp987625-Jun-08 2:27
membercp987625-Jun-08 2:27 
Luc Pattyn wrote:
countN tells me how many factors of n! end on digit N


OK now I see what you are doing. I'm sure you have some very clever reason for this, but it is not clear to me why you do

count5 += count10;	
if (count5 != 0) 
   {
   result = (result * rightmostNonzeroInFactorial(count5)) % 10;
   count2 -= count5;
   }


and not what I would expect:

if (count5 != 0) 
   {
   result = (result * rightmostNonzeroInFactorial(count5)) % 10;
   count2 -= count5;
   }
if (count10 != 0) 
   {
   result = (result * rightmostNonzeroInFactorial(count10)) % 10;
   }


Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

GeneralRe: Factorials Pin
Luc Pattyn25-Jun-08 2:34
mvpLuc Pattyn25-Jun-08 2:34 
GeneralRe: Factorials Pin
cp987625-Jun-08 2:40
membercp987625-Jun-08 2:40 
AnswerRe: Factorials Pin
tim_one14-Jul-08 8:37
membertim_one14-Jul-08 8:37 
AnswerRe: Factorials Pin
Arash Partow25-Jun-08 2:14
memberArash Partow25-Jun-08 2:14 
GeneralRe: Factorials Pin
Ian Uy25-Jun-08 6:26
memberIan Uy25-Jun-08 6:26 
QuestionHow to determine the next x,y coordinate for a tank in a 2-D game... Pin
Edmundisme18-Jun-08 8:35
memberEdmundisme18-Jun-08 8:35 
AnswerRe: How to determine the next x,y coordinate for a tank in a 2-D game... Pin
73Zeppelin18-Jun-08 11:38
member73Zeppelin18-Jun-08 11:38 
GeneralRe: How to determine the next x,y coordinate for a tank in a 2-D game... Pin
Matthew Butler18-Jun-08 11:44
memberMatthew Butler18-Jun-08 11:44 
GeneralRe: How to determine the next x,y coordinate for a tank in a 2-D game... Pin
73Zeppelin18-Jun-08 22:00
member73Zeppelin18-Jun-08 22:00 
GeneralRe: How to determine the next x,y coordinate for a tank in a 2-D game... Pin
Edmundisme18-Jun-08 12:00
memberEdmundisme18-Jun-08 12:00 
AnswerRe: How to determine the next x,y coordinate for a tank in a 2-D game... Pin
Matthew Butler18-Jun-08 11:41
memberMatthew Butler18-Jun-08 11:41 
GeneralRe: How to determine the next x,y coordinate for a tank in a 2-D game... Pin
Edmundisme18-Jun-08 12:01
memberEdmundisme18-Jun-08 12:01 
JokeRe: How to determine the next x,y coordinate for a tank in a 2-D game... Pin
CPallini18-Jun-08 21:19
mvpCPallini18-Jun-08 21:19 
QuestionPolyline offset algorithm Pin
beko16-Jun-08 21:59
memberbeko16-Jun-08 21:59 
AnswerRe: Polyline offset algorithm Pin
Alan Balkany17-Jun-08 4:07
memberAlan Balkany17-Jun-08 4:07 
GeneralRe: Polyline offset algorithm Pin
beko17-Jun-08 4:43
memberbeko17-Jun-08 4:43 
QuestionRe: Polyline offset algorithm Pin
CPallini17-Jun-08 7:03
mvp CPallini17-Jun-08 7:03 
AnswerRe: Polyline offset algorithm Pin
beko17-Jun-08 8:26
memberbeko17-Jun-08 8:26 
GeneralRe: Polyline offset algorithm Pin
cp987617-Jun-08 12:10
membercp987617-Jun-08 12:10 
AnswerRe: Polyline offset algorithm Pin
Arash Partow18-Jun-08 1:22
memberArash Partow18-Jun-08 1:22 
GeneralRe: Polyline offset algorithm Pin
beko18-Jun-08 19:55
memberbeko18-Jun-08 19:55 
QuestionWhat's the period of (cos ax)(sin bx)? Pin
sherifffruitfly14-Jun-08 10:00
membersherifffruitfly14-Jun-08 10:00 
AnswerRe: What's the period of (cos ax)(sin bx)? Pin
cp987614-Jun-08 19:03
membercp987614-Jun-08 19:03 
AnswerRe: What's the period of (cos ax)(sin bx)? Pin
MarkBrock15-Jun-08 2:00
memberMarkBrock15-Jun-08 2:00 
AnswerRe: What's the period of (cos ax)(sin bx)? Pin
CPallini15-Jun-08 22:02
mvp CPallini15-Jun-08 22:02 
QuestionQuaternion to Euler Pin
Xmen 11-Jun-08 3:08
member Xmen 11-Jun-08 3:08 
AnswerRe: Quaternion to Euler Pin
cmk11-Jun-08 11:27
membercmk11-Jun-08 11:27 
GeneralRe: Quaternion to Euler Pin
Xmen 11-Jun-08 12:48
member Xmen 11-Jun-08 12:48 
AnswerRe: Quaternion to Euler Pin
Mark Churchill12-Jun-08 18:38
memberMark Churchill12-Jun-08 18:38 
QuestionGraphical Object drawing algorithms Pin
Monty29-Jun-08 2:59
memberMonty29-Jun-08 2:59 
AnswerRe: Graphical Object drawing algorithms Pin
73Zeppelin9-Jun-08 3:11
member 73Zeppelin9-Jun-08 3:11 
GeneralRe: Graphical Object drawing algorithms Pin
Monty29-Jun-08 3:24
memberMonty29-Jun-08 3:24 
GeneralRe: Graphical Object drawing algorithms Pin
73Zeppelin9-Jun-08 3:37
member 73Zeppelin9-Jun-08 3:37 
GeneralRe: Graphical Object drawing algorithms Pin
Tim Craig9-Jun-08 17:37
memberTim Craig9-Jun-08 17:37 
GeneralRe: Graphical Object drawing algorithms Pin
Monty29-Jun-08 21:02
memberMonty29-Jun-08 21:02 
GeneralRe: Graphical Object drawing algorithms Pin
Tim Craig9-Jun-08 21:15
memberTim Craig9-Jun-08 21: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.


Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 22 Jun 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid