Quite the contrary! Most of the other lines (where you define your functions) should be outside of main().
Basically your program should look like:


#include <stdio.h>
// if necessary include...