Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Message loop not branching properly Pin
John R. Shaw3-Jun-06 4:01
John R. Shaw3-Jun-06 4:01 
GeneralRe: Message loop not branching properly Pin
Goldstandard3-Jun-06 20:21
Goldstandard3-Jun-06 20:21 
GeneralRe: Message loop not branching properly Pin
John R. Shaw13-Jun-06 22:17
John R. Shaw13-Jun-06 22:17 
QuestionCBitmapButton Pin
akshita_152-Jun-06 21:22
akshita_152-Jun-06 21:22 
AnswerRe: CBitmapButton [modified] Pin
_AnsHUMAN_ 2-Jun-06 23:46
_AnsHUMAN_ 2-Jun-06 23:46 
GeneralRe: CBitmapButton [modified] Pin
akshita_153-Jun-06 0:36
akshita_153-Jun-06 0:36 
GeneralRe: CBitmapButton [modified] Pin
_AnsHUMAN_ 3-Jun-06 1:04
_AnsHUMAN_ 3-Jun-06 1:04 
Questioninteresting question, number of 0s at the end of N! Pin
George_George2-Jun-06 21:16
George_George2-Jun-06 21:16 
Hello everyone,


My friend and I are discussing about an interesting question, how to calculate efficiently how many 0s are at the end of N! (1 * 2 * 3 * ... * N-1 * N).

Our algorithm is like this,

1. Use a loop to calculate N!
2. Use a loop to calculate %10 result of N!, then /10 each step

Are there any better solutions?


regards,
George
AnswerRe: interesting question, number of 0s at the end of N! Pin
John R. Shaw3-Jun-06 4:15
John R. Shaw3-Jun-06 4:15 
GeneralRe: interesting question, number of 0s at the end of N! Pin
George_George4-Jun-06 16:31
George_George4-Jun-06 16:31 
GeneralRe: interesting question, number of 0s at the end of N! Pin
John R. Shaw13-Jun-06 22:29
John R. Shaw13-Jun-06 22:29 
GeneralRe: interesting question, number of 0s at the end of N! Pin
George_George13-Jun-06 22:37
George_George13-Jun-06 22:37 
GeneralRe: interesting question, number of 0s at the end of N! Pin
John R. Shaw13-Jun-06 23:51
John R. Shaw13-Jun-06 23:51 
GeneralRe: interesting question, number of 0s at the end of N! Pin
George_George14-Jun-06 2:35
George_George14-Jun-06 2:35 
GeneralRe: interesting question, number of 0s at the end of N! Pin
John R. Shaw14-Jun-06 2:59
John R. Shaw14-Jun-06 2:59 
GeneralRe: interesting question, number of 0s at the end of N! Pin
George_George14-Jun-06 3:42
George_George14-Jun-06 3:42 
AnswerRe: interesting question, number of 0s at the end of N! [modified] Pin
Stephen Hewitt4-Jun-06 14:06
Stephen Hewitt4-Jun-06 14:06 
GeneralRe: interesting question, number of 0s at the end of N! [modified] Pin
George_George4-Jun-06 16:30
George_George4-Jun-06 16:30 
GeneralRe: interesting question, number of 0s at the end of N! [modified] Pin
Stephen Hewitt4-Jun-06 17:48
Stephen Hewitt4-Jun-06 17:48 
GeneralRe: interesting question, number of 0s at the end of N! [modified] Pin
George_George4-Jun-06 17:50
George_George4-Jun-06 17:50 
QuestionCannot access classview. Pin
Anu_Bala2-Jun-06 20:49
Anu_Bala2-Jun-06 20:49 
AnswerRe: Cannot access classview. Pin
_AnsHUMAN_ 2-Jun-06 23:22
_AnsHUMAN_ 2-Jun-06 23:22 
Questionconvert unicode? Pin
raghuji.rao2-Jun-06 19:21
raghuji.rao2-Jun-06 19:21 
AnswerRe: convert unicode? Pin
Taka Muraoka2-Jun-06 20:59
Taka Muraoka2-Jun-06 20:59 
AnswerRe: convert unicode? Pin
knoxplusplus8-Jun-06 7:47
knoxplusplus8-Jun-06 7:47 

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.