C++ Function Definition create Functions with parameter

Description

C++ Function Definition create Functions with parameter

#include <iostream>

using namespace std;

int AddOne(int start)
{
  int newnumber;/*w  ww.j  ava2 s  . c o m*/
  newnumber = start + 1;
  return newnumber;
}

int main()
{
  int testnumber;
  int result;

  testnumber = 20;
  result = AddOne(testnumber);

  cout << result << endl;
  return 0;
}



PreviousNext

Related