Here's a little light on the subject.
Most responses towards someone looking for the easy way out when it comes to school projects here at LQ will yield similar results to this one.
If I were to tell you flat out how to do it, you may not learn much about gcc and/or multiple versions of gcc in the same OS. But if you were to ask that question in the Google search field at the top of your browser or navigate to
www.google.com and ask the question there, you are likely going to read (and learn) a few web pages of info before you manage to do it, thus you will learn more about gcc than you would if I were to do your homework for you.