Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to write a program that gives and takes advice onprogram writing. The pro

ID: 3618887 • Letter: I

Question

I need to write a program that gives and takes advice onprogram writing. The program starts by writing a piece of advice tothe screen and asking the user to type in a different piece ofadvice. The program then ends. The next person to run the programreceives the advice given by the person who last ran the program.The advice is kept in a file, and the contents of the file changeafter each run of the program. You can use your editor to enter theinitial piece of advice in the file so that the first person whoruns the program receives some advice. Allow the user to type inadvice of any length so that it can be any number of lines long.The user is told to end his or her advice by pressing the Returnkey two times. Your program can then test to see that it hasreached the end of the input by checking to see when it reads twoconsecutive occurrences of the character ' ' If you can please helpwill rate. I need to write a program that gives and takes advice onprogram writing. The program starts by writing a piece of advice tothe screen and asking the user to type in a different piece ofadvice. The program then ends. The next person to run the programreceives the advice given by the person who last ran the program.The advice is kept in a file, and the contents of the file changeafter each run of the program. You can use your editor to enter theinitial piece of advice in the file so that the first person whoruns the program receives some advice. Allow the user to type inadvice of any length so that it can be any number of lines long.The user is told to end his or her advice by pressing the Returnkey two times. Your program can then test to see that it hasreached the end of the input by checking to see when it reads twoconsecutive occurrences of the character ' ' If you can please helpwill rate.

Explanation / Answer

please rate - thanks #include #include using namespace std; int main(){ string input; fstream inout;    inout.open("input.txt", ios::in);             if(inout.fail())                 { cout