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

john\′s Photo
2 Oct 08, 4:29PM
C++,binary calculator
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);
Currently you need to be logged in to leave a message.