Need Help with the following programming problem: Write a program that reads text from one file and writes an edited version ofthe same text to another file.The editedversion is identical to theunedited version except that every string of two or moreconsecutive blanks is replaced by a single blank. Thusthe text is edited to remove any extra blankcharacters. The program should define a function that iscalled the input and output-file streams asarguments. Need Help with the following programming problem: Write a program that reads text from one file and writes an edited version ofthe same text to another file.The editedversion is identical to theunedited version except that every string of two or moreconsecutive blanks is replaced by a single blank. Thusthe text is edited to remove any extra blankcharacters. The program should define a function that iscalled the input and output-file streams asarguments.