I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Programming » C/C++ »

C++,binary calculator

joey_batusin\′s Photo
2 Oct 08, 4:05AM
(3 replies)
C++,binary calculator
how to random binary numbers using itoa???
john\′s Photo
2 Oct 08, 4:29PM
Sounds simple:
char str[20];   // Must be big enough to hold entire random number 
  srand ( time(NULL) );  // initialise random seed
 
  double a= rand() % 10 + 1;  // generate number 1 to 10 in this case
  itoa(a, str, 2);
joey_batusin\′s Photo
6 Oct 08, 7:23AM
hey folks thanks for the help your such a nice person....
paddysmith\′s Photo
22 Mar 12, 3:12AM
Thank you show much for sharing the usefull coding.
Currently you need to be logged in to leave a message.