思路:
这道题挺简单的,就是统计名字数量而已。纯粹就是这道题的题目让我虎躯一震,挺有意思的哈哈哈
情人节VIP专属题目
#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
vector<string> a;
string s;
cin >> s;
while (!(s == "."))
{
a.push_back(s);
cin >> s;
}
if (a.size() >= 14)
{
cout << a[1]<<" and "<<a[13]<<" are inviting you to dinner..." << endl;
}
else if (a.size() < 14&&a.size()>1)
{
cout << a[1]<<" is the only one for you..." << endl;
}
else if (a.size() < 2)
{
cout << "Momo... No one is for you ...";
}
system("pause");
return 0;
}