Answers for "c++ function in function"

C++
21

how to declare a function in c++

// function example
#include <iostream>
using namespace std;

int addition (int a, int b)
{
  int r;
  r=a+b;
  return r;
}
Posted by: Guest on March-04-2020
0

what is c++ function

return_type function_name( parameter list ) {
   body of the function
}
Posted by: Guest on July-16-2021
1

Functions in C++

// 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;
}
Posted by: Guest on October-06-2021

Browse Popular Code Answers by Language