Operators/Parantheses

From FizzFuzz

Jump to: navigation, search
Go back to Operators.

Parentheses are used to alter the order of operations for an expression. They are indicated by ( and ) (right and left parentheses), and must be balanced. That is, there must be one parentheses on the right for every parentheses on the left.

Notation

1 [ #1 α2 #2 [ ... [ #n αn]]])

Where:

Example

int alpha = 12;
int beta = 6;
int gamma = 3;
 
output << alpha * beta + gamma; // Outputs "75".
output << (alpha * beta) + gamma; // Also outputs "75".
output << alpha * (beta + gamma); // Outputs "108".
Personal tools