Welcome to SO. Please note that this is not a site where you post your homework questions for others to do it for you. Make a genuine attempt yourself, and ask a specific question (if any) regarding your code. You might also want to read Open letter to students with homework problems. — JustASimpleLonelyProgrammer 12 secs ago