Falling Square

Hello! I’m using Codeblocks with Glut and I need a program(or 3 separeted) with these 3 requirements:

  1. A red square falling
  2. A red square climbing(reverse of 1)
  3. A red square falling and changing his color in blue

Cand someone help me? Please!