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

#include <iostream> #include <string> #include <cctype> using namespace std; int

ID: 3619098 • Letter: #

Question

#include <iostream>

#include <string>

#include <cctype>

using namespace std;

int main()

{

string o, sentence = "";

cout << "enter sentenc"<< endl;

do

{

getline(cin, o);

if(sentence.length() ==0)

sentence = o;

else

sentence = sentence + " "+ o;

}while(o.find(".") ==string::npos);

char current;

bool found = false;

for (inti = 0; i < sentence.length(); i++)

{

current = sentence[i];

if(i==0)

current = toupper(current);

else

current = tolower(current);

if(isspace(current))

{

if(found == false)

{

cout << current;

found = true;

}

}else

{

cout << current;

found = false;

}

}

cout << endl;

return 0;

}

Explanation / Answer

please rate - thanks start with the code I sent you last night and make the changes I'm commenting in #include #include using namespace std; int main() {string input; int i,j; cout