Linux
Forum Addict

- Joined
- Sep 2, 2008
- Sythe Gold
- 0
- Messages
- 368
I am confused with functions
I do not get the type name, parameters, and returning
type name ( parameter1, parameter2, ...)
please explain how this program works as simplest as possible focusing on what I said above
I do not get the type name, parameters, and returning
type name ( parameter1, parameter2, ...)
please explain how this program works as simplest as possible focusing on what I said above
Code:
// function example
#include <iostream>
using namespace std;
int addition (int a, int b)
{
int r;
r=a+b;
return (r);
}
int main ()
{
int z;
z = addition (5,3);
cout << "The result is " << z;
return 0;
}

