C++ Syntax:Arithmetic: + - * / %

Description

The C++ arithmetic operators + - / and * are just as in FORTRAN There is no exponentiation operator **, instead do:-
exp(x)
which requires the header file
#include <math.h>

% is the modulo operator, for example:-

5 % 3 is 2.

See operator precedence

Other Uses for + - * / %

Usage Notes

None.
Go Back to the The C++ Crib Top Page


If you have any comments about this page please send them to Nick West