Example (xy)
def is an assignment to a variable
c-use is a computational use of a variable
p-use is a predicate use of a variable
1. scanf(x,y); if (y < 0)
2. pow = -y;
3. else pow = y;
4. z = 1.0;
5. while (pow != 0)
6. {z=z*x;pow--;}
7. if (y < 0)
8. z = 1.0/z;
9. printf(z);
Previous slide
Next slide
Back to first slide
View graphic version