a program that reads user input and writes it to a file