Basta che acquisisci le varie stringhe attraverso scanf o fgets.