/* This function takes in four integer values and returns a single integer value depending upon the four values entered. The object of this exercise if to familiarize the student with nested 'if' statements. */ int if_function(int a, int b, int c, int d) { int r = 0; if (a > b) { r = a; if (a < c) { r += c; } else { if (b == d) { r += d; if (c > d) r += b; else r += d; } else r += 4; r += 5; } } else if (a >= c) r += 6; else r += 7; return r; }