We're not a homework service so please don't take the mickey.
Work on it yourself and come back with code and a specific problem you're facing. The simple answer however is to use the Scanner class...