Finding the Maximum of Two Integers
Here’s a small function that you might write to find the maximum of two integers.
int maximum(int a, int b)
{
if (a > b)
return a;
else
return b;
}
Previous slide
Next slide
Back to first slide
View graphic version