I am writing smart contract and stucked on this line :
int p = 0; p = (rand() % 997);
This is giving error
error: use of undeclared identifier 'rand'
I do search and got some reference links but not getting expected answers. Some old answers reference links are also not valid now. Can somebody please help to generate random numbers in a smart contract?