first of all i dont think the first template is necessary.
The outline of your code should be that:
1. The user inputs the speed in mph(double or float)
2. The speed in mph is passed to the converter(function)
3. The output(speed in kph) is then displayed.
Use this as a template:
1 2 3 4 5 6 7 8 9 10 11 12 13
int increment(int i){
return ++i;
}
int main(){
int x;
cout<<"Enter an integer: ";
cin>>x;
cout<<"\nOutput is: "<<increment(x);
return 0;
}