#include <cstdlib>
#include <iostream>
#include "ccc_time.h"
using namespace std;
int main(int argc, char *argv[])
{
double r[10];
Time now;
int seed=now.seconds_from(Time(0,0,0));
srand(seed);
for (int i=1; i<=10; i++)
{
r[i]=(rand()%10+1);
cout << r[i] << endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}
This generates numbers between 1 and 10. What do I have to put instead of "%10+1" to make decimal numbers between 0 and 1? Please, help. Thank you in advance.