Hi, I have a problem with C++. Here is the question Given: #include <iostream> #
ID: 3638972 • Letter: H
Question
Hi, I have a problem with C++. Here is the question
Given:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{ string Fname,Buf;
cout<<" Please type file name "<<endl;// get file name
getline(cin,Fname);
ifstream In(Fname.c_str());// open selected file
if(In.bad()){cout<<" Open failed"<<endl; exit(999);}// quit if open failed
while(In>>Buf)cout<<Buf<<endl;// print file contents
return 0;
}
Modify the above program such that the new program will allow a user to convert any file to :
a. All upper case or
b. All lower case or
c. Reverse case (i. e. upper-case to lower case and lower case to upper case)
Explanation / Answer
#include #include #include #include using namespace std; int main() { string Fname,Buf; int choice; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.