Close
To suscribe Cquery.h please enter your email below..
After suscribing kindly check your mail box immediately
to complete your suscription.
I don't want any update | Let me download
Cquery.h
Code less C fast..
Download v0.1
Cquery.h is written by a student of SSUET by keeping TURBOC compiler in his mind only.
All the code are copyrighted so please respect other's efforts :) and don't distribute Cquery.h with your name.
Thanks.

Friday, 4 April 2014

rand_f()

rand_f doesn't take any argument and it returns a random number between 0.010000 to 0.990000

Syntax:


rand_f();

Example::


#include<cquery.h>
void main(void)
{
int i;
randomize();
for(i = 0 ; i < 10 ; i++)
{
printf("%f\n",rand_f());
}
getch();
}
/* Possible Output:
* 0.07
* 0.65
* 0.02
* 0.98
* 0.76
* 0.05
* 0.07 
* 0.23
* 0.33
* 0.01
*/

No comments:

Post a Comment