Just like Maple, C provides you with the basic math operators:
- + for addition,
- - for subtraction,
- * for multiplication, and
- / for division.
Unfortunately, C doesn't have a built-in exponentiation operator.
You can group together parts of an expression with parentheses, like this:
result = (a + b) * c;
Pretty much all of this should be familiar to you already, since you have a
fair amount of Maple experience under your belt. Our example C program
contains examples of the basic math operators. Look them over before you
continue on to the next section.
Eric N. Eide
Hamlet Project
Department of Computer Science
University of Utah