Write an if-else statement that prints "Goodbye" if userString is "Quit", else prints "Hello". End with newline.
#include <iostream>
#include <string>
using namespace std;
int main() {
string userString;
cin >> userString;
/* Your solution goes here */
return 0;
}
1
Expert's answer
2019-12-02T12:16:56-0500
#include <iostream>
#include <string>
using namespace std;
int main() {
string userString;
cin >> userString;
/* Your solution goes here */
if (userString=="Quit") cout << "GoodBye!" << endl;
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments