The structure is simple. Pay attention to placement of curly braces and semicolons, specifically, where they are NOT.
// The next line is a function signature to tell the compiler that
// the actual function will follow later. You either need a signature
// or the actual function to appear before it is ever used anywhere.
// note the ...
ranks means an array of values that has been named ranks; from the declaration, we can tell that the values will all be integers. Any time you see a name followed by square brackets in C-based languages (C, C++, Java, etc.), you know that you are dealing with an array. If you have an integer or integer variable (such as i) in the square brackets, then you ...