Have a look at
this[
^].
Or you could have googled it.
BTW no one would work for you for free. As its your homework, do it yourself. As you said, you are beginner, start with small programs like printing normal number sequence, then advance through step by step. Post the question if you are stuck with some code or logic, you'll definitely get help then.
All the best.