// Making the function
void getSpeed(int &speed){
// initialize the variable to take input
int input =0;
cout << " Enter the Number in range of 20 through 70 : "<<;
cin>>input;
// validate the input
if(input>=20 && input<=70)
speed = input;
else
speed = 0;
}