Write the definition of a function oneMore , which receives an integer parameter and returns an integer that is one more than the value of the parameter . So if the parameter ‘s value is 7, the function returns the value 8. If the parameter ‘s value happens to be 44, the functions returns the value 45.

LANGUAGE: C++

CHALLENGE:

Write the definition of a function oneMore , which receives an integer parameter and returns an integer that is one more than the value of the parameter . So if the parameter ‘s value is 7, the function returns the value 8. If the parameter ‘s value happens to be 44, the functions returns the value 45.

SOLUTION:

int oneMore(int amount){
   return amount + 1;
}

Posted in ,