The code of the given problem is given below :
#include<iostream>
using namespace std;
void print( float speed ){
if(speed < 20 )
{
cout<<"too slow\\";
}
else if(speed > 80 )
{
cout<<"too fast\\";
}
else{
cout<<"right\\";
}
}
int main()
{
print( 18.6 );
print( 45 );
print( 100 );
return 0;
}