#include<iostream>
#include<string>
//missing some (;).
//also can be done with string but a single letter.
//I have changed the string to char.
//char values ranging between ('').
usingnamespace std;
int main()
{
string first = "";
string last = "";
const string invalid = "Invalid input";
char type;
char color;
cout << "Choose furniture type" <<endl;
cout << "Enter T for a table or C for a chair: " <<endl;
cin >> type;
if (type == 'T')
{
first = "T47";
}
elseif (type == 'C')
{
first = "C47";
}
else
{
cout << "invalid choice of furniture type or color" <<endl;
}
cout << "Choose furniture color" <<endl;
cout << "Enter R for red, B for black or G for green" <<endl;
cin >> color;
if (color == 'R')
{
last = "41";
}
elseif (color == 'B')
{
last = "25";
}
elseif (color == 'G')
{
last = "30";
}
else
{
cout <<"Invalid choice of furniture type or color" <<endl;
}
cout <<"Product code: " << first + last <<endl;
system("pause");
return 0;
}