rendered paste body#include <iostream>#include <string>#include <fstream>using namespace std;int readfile(void);int main(int argc, char *argv[]){int choice = 0;while (choice != 3){ cout << "1. Read File" << endl << "2. Hello World!" << endl << "3. End Program" <<endl; cin>>choice; switch (choice) { case 1: readfile(); break; case 2: cout<< "Hello World! "<<endl; break; case 3: break; default: break; } } }int readfile(void){ ifstream fin; string name = ""; fin.open ("helloworld.txt"); if (fin.fail()) { cout<<"Error could not open file!" <<endl; } getline(fin, name); if (name == "") { cout<< "Hello World!"<<endl; } else { cout<< "Hello " << name << "!" << endl; } fin.close(); return 0;}