mockers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

RAND5 to RAND7 : Bhagalpur SIr

3 posters

Go down

RAND5 to RAND7 : Bhagalpur SIr Empty RAND5 to RAND7 : Bhagalpur SIr

Post  ballu Sun Feb 01, 2009 10:31 pm

Given a function RAND5 that genrates random numbers in the range 0 t0 5
write afunction that RAND7

google question
ballu
ballu

Posts : 58
Join date : 2009-02-01

Back to top Go down

RAND5 to RAND7 : Bhagalpur SIr Empty Re: RAND5 to RAND7 : Bhagalpur SIr

Post  ramthegreatcv Mon Feb 02, 2009 1:36 am

int RAND7() {
return ((RAND5+RAND5+RAND5+RAND5+RAND5+RAND5+RAND5 ) /5 );
}

does (7*RAND5)/5 , do the same thing??
ramthegreatcv
ramthegreatcv

Posts : 55
Join date : 2009-01-30
Age : 35

Back to top Go down

RAND5 to RAND7 : Bhagalpur SIr Empty @RAM P

Post  ballu Mon Feb 02, 2009 1:56 am

7*RAnd5/ 5 wont be the same thing
becoz the output fro rand is diff for each of the calls??

btw: In ur solution the probability of all the digits is not the same ??
ballu
ballu

Posts : 58
Join date : 2009-02-01

Back to top Go down

RAND5 to RAND7 : Bhagalpur SIr Empty @ballu

Post  Admin Wed Feb 04, 2009 10:58 am

man ,i am not getting your last sentence.

Admin
Admin

Posts : 47
Join date : 2009-01-29

https://mockers.forumotion.com

Back to top Go down

RAND5 to RAND7 : Bhagalpur SIr Empty @Ramp

Post  ballu Fri Feb 06, 2009 9:28 pm

in ur solution the probability of occurrence of all digits is not same
ballu
ballu

Posts : 58
Join date : 2009-02-01

Back to top Go down

RAND5 to RAND7 : Bhagalpur SIr Empty Re: RAND5 to RAND7 : Bhagalpur SIr

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum