You must learn programming, at best Google for some
Youtube tutorials for beginners. Make some drinks and something to eat and watch for some hours to learn. Have a good time ;-)
To get a solution the first step is to break down your task into smaller solvable steps. The first step is usually to ask the user for input
AND check it for valid values. Like in this
I/O tutorial described.