You can use a function in cout, but the functions given would have ridiculous output if you used them that way.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
//to make a function return a value
//you give it a return type and then make sure it returns that type
//using the examples you used I would do something like this
int numd() {
int a;
cout << "Enter the number: ";
cin >> a;
return a;
}
void display() {
int a = numd();
cout << "The number you input is: " << a;
}