How to make a program so that it could read from the text file and then perform same function according to the syntax of the text file.