working and repeated scanf function