i'm writing a program where i want to choose a random double but not greater than "i" which is a specific value --lets say 60--i'm doing the following:
double b = rand()%i+1
and i get the error while compiling :
invalid operands of types 'int' and 'double' to binary 'operator%'
what might be the fault?
thanks in advance