Created scanF function.