Branching – Tweet decoder step 2
//Program that prints abbreviations in a tweet
include
include
using namespace std;
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper Nowint main() {
string tweet;
int pos;
cout << "Enter your tweet: "; getline(cin, tweet); tweet.resize(160); pos = tweet.find("LOL"); if (pos >= 0) { cout << "LOL = laughing out loud" << endl; } pos = tweet.find("IRL"); if (pos >= 0) { cout << "IRL = in real life" << endl; } pos = tweet.find("AFK"); if (pos >= 0) { cout << "AFK = away from keyboard" << endl; } pos = tweet.find("NVM"); if (pos >= 0) { cout << "NVM = never mind" << endl; } pos = tweet.find("BFF"); if (pos >= 0) { cout << "BFF = best freinds forever" << endl; } pos = tweet.find("FTW"); if (pos >= 0) { cout << "FTW = for the win" << endl; } pos = tweet.find("IIRC"); if (pos >= 0) { cout << "IIRC = if I recall correctly" << endl; } pos = tweet.find("TTYL"); if (pos >= 0) { cout << "TTYL = talk to you later" << endl; } pos = tweet.find("IMHO"); if (pos >= 0) { cout << "IMHO = in my humble opinion" << endl; }
system(“pause”);
return 0;
}
<h5 style="