how to write a program of functions accepting values and returning values?

Your question is essentially "how do I write a program using functions?", which is extremely vague and basic. Do you know how functions work and the syntax for defining them?

Also, we don't do your homework.

Handling functions is one of the basics that you will come across. Also, post the source code of what you have done so far. If you really need help with functions, have a look at Functions in c++