Aren't there any examples in your text book? Prompt the user for input, validate it - if it's bad, show a message or if it's good, calculate the result and show the user. Programs are just cumulative weekly exercises.