You need to solve your homework for yourself and to learn C and also to discuss the result of your homework i.e. the code.
So visit some
Learn C tutorial.
Tips:
- install
Visual Studio
- write clear code with "speaking names" for function and variables
- comment the code
- write some tests to check that the code works
Good luck!