Example
// Yield the maximum of x and y
public int max(int x, int y)
{int z;
z= x;
if (y > x)
z= y;
return z;
}
The call is in the assignment given below.
int b;
b= max (3*20, 6+5) + 2;
Previous slide
Next slide
Back to first slide
View graphic version