subject

Write an if-else statement that prints "Goodbye" if userString is "Quit", else prints "Hello". End with newline. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include #include using namespace std; int main() { string userString; cin >> userString; /* Your solution goes here */ if (userString = 'Quit'){ cout << "Goodbye" << endl; } else cout << "Hello" << endl; return 0; }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 14:20
The concept of comes from the acknowledgment that data changes form and often gets copied, moved, and stored in many places. sensitive data often leaves the protection of application databases and ends up in e-mails, spreadsheets, and personal workstation files.
Answers: 3
question
Computers and Technology, 22.06.2019 19:20
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_cost should be removed since header files should not contain constants.c)the definition of book should be removed since header files should not contain class definitions.d)the body of the calculate_terms function should be added to the header file.
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
question
Computers and Technology, 24.06.2019 02:20
Peter is thinking of a number which isless than 50. the number has 9 factors.when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
You know the right answer?
Write an if-else statement that prints "Goodbye" if userString is "Quit", else prints "Hello". End w...
Questions
question
Mathematics, 28.01.2020 09:31
question
Mathematics, 28.01.2020 09:31