Exercise: Maximum of 3 numbers

Let's wrap up what we have learned at this point:

Let's use what you learned to write a function which returns the greater of 3 numbers. There are many different ways how to solve it, just pick one!

#include <stdio.h>

int max3(int a, int b, int c) {
	/* your code goes here! */
	return 0;
}

int main() {
	printf("max3(1, 2, 3) is %d\n", max3(1, 2, 3));
	printf("max3(4, 1, 2) is %d\n", max3(4, 1, 2));
	printf("max3(1, 5, 2) is %d\n", max3(1, 5, 2));
	printf("max3(4, 4, 3) is %d\n", max3(4, 4, 3));
	printf("max3(1, 2, 2) is %d\n", max3(1, 2, 2));
	printf("max3(1, 0, 1) is %d\n", max3(1, 0, 1));
  return 0;
}

Make sure your code passes the test!