(Modify) Rewrite the following programs to conform to good programming practice and correct syntax:
a.
#includeusing namespace std;int main(){cout <<“The time has come”; return 0;} b.
#includeusing namespace std;int main( ){cout << “Newark is a city\n”;cout <<“in New Jersey\n”; cout <<“It is also a city\n”; cout << “in Delaware\n”; return 0;} c.
#includeusing namespace std;int main() {cout << Reading a program\n”;cout <<“is much easier\n”; cout << “if a standard form for main is used\n”; cout<<“and each statement is written\n”;cout<< “on a line by itself\n”; return 0;} d.
#includeusing namespace std;int main( ){ cout << “Every C++ program”; cout<<“\nmust have one and only one”;cout << “main function”;cout <<“\n The escape sequence of characters”); cout <<“\nfor a newline can be placed anywhere”; cout<<“\n in the message passed to cout”; return 0;}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.