random number generation

hello im trying to generate a random number but i have to meet these requirements
a. The m_obd object provides the following function:
readPID(byte pid, double& result),

Pass the constant PID_SPEED as the first argument in order to call the method and return the associated speed.

The variable result is of type double and is passed by reference. As such, the speed data is returned in the result variable.

An example call for retrieving the speed is show below:

double value;
if (m_obd.readPID(PID_SPEED, value))
// After the call the variable value will contain the speed.

iv been working on this for a while but im new to programming so im struggling pretty hard

This will kick things off.

When is your homework due in?

If you have been working on it for a while you will have some ideas you have tried, if you want help you need to show us what you tried and where you got stuck.