look into the scanf function... below is the page describing it and all it's formatting options
scanf(3) - Linux manual page


for example... assuming number is defined like so: int number;...