Flowchart version1 for the program.