Branching – Tweet decoder step 1
include
include
using namespace std;
int main() {
string tweet;
cout << “Enter abbreviation from tweet: “; cin >> tweet;
// Output decoded abbreviation from tweet
if (tweet == “LOL”) {
cout << “LOL = laughing out loud” << endl;
}
else if (tweet == “IRL”) {
cout << “IRL = in real life” << endl;
}
else if(tweet == “AFK”){
cout<<“away from keyboard” <<endl;
}else if(tweet == “NVM”){
cout<<“Never mind” <<endl;
}else if(tweet == “BFF”){
cout<<“best friends forever” <<endl;
}else if(tweet == “FTW”){
cout<<“for the win” <<endl;
}else if(tweet == “IIRC”){
cout<<“if I recall correctly” <<endl;
}else if(tweet == “TTYL”){
cout<<“talk to you later” <<endl;
}else if(tweet == “IMHO”){
cout<<“in my humble opinion” <<endl;
}else {
cout << “Sorry, don’t know that one.” << endl;
}
return 0;
}
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
