Passing a variable to a function - C++ Function

C++ examples for Function:Function Parameter

Description

Passing a variable to a function

Demo Code

#include <iostream> 
#include <math.h> 

using namespace std; 

int main() //from  w  w  w  . ja  v  a 2  s .  com
{ 
  double start; 
  double finish; 

  start = -3.5; 
  finish = fabs(start); 

  cout << finish << endl; 
  return 0; 
} 

Result


Related Tutorials