Code:
double passengersR (); // this is a declaration of the function passengersR
double m; // Here a variable m is declared, its value is undefined
guess that is not what you want
Code:
double m = passengersR (); // Here a variable m is declared, it is initialized with the return value of the call to passengersR
But then you still have a problem
Code:
double passengersR ()
{
double m;
int num; // the value of num is undefined could be any value
m=120*num; // if you multiply an undefined value by 120 still gives you an undefined value
return m;
}
Kurt