The C++Course provides a general introduction to programming in C++. It is based on A.B. Downey's book, How to Think Like a Computer Scientist. Click here for details. 
Home Function Composition of Functions  
See also: Composition  
Composition of Functions
This statement takes the value of pi, divides it by two and adds the result to the value of angle. The sum is then passed as an argument to the cos function. You can also take the result of one function and pass it as an argument to another: double x = exp (log (10.0));This statement finds the log base e of 10 and then raises e to that power. The result gets assigned to x; I hope you know what it is.


Home Function Composition of Functions 