Question: Need help with code. I'm getting an error for this. What would be the proper output? #include #include using namespace std; int main() { string
Need help with code.
I'm getting an error for this. What would be the proper output?
#include
#include
using namespace std;
int main()
{
string word1, word2, word3;
int a, b, c;
word1 = "see";
word2 = "please";
word3 = "thanks";
word1 = word2 + " " + word3;
word2 = word2 + word3;
a = word1.length();
b = word2.length();
c = word3.length();
cout << a << endl << b << endl << c;
cout << endl << word1 << endl << word2 << endl << word3;
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
