rand

  1. aditya.shevade

    Help needed in C, rand() function.

    Hi I am providing a code here which is a bulls cows game. I have compiled it using gcc. The program runs fine, but the rand function always generates 8467 as the first number. Earlier I had used turboc and compiled the prgram. That program selects a differant value everytime. But with gcc...
  2. L

    random number between 0&1 in C?

    hi, the inbuilt function rand() generates a large integer that i hav to use rand()%x to get a number 0 & x including 0. how do i generate a number a > 0 and < 1 using the rand function. i knew its not that difficult, either divide the rand() by a number larger.. or divide by another rand()...
Top Bottom