思路:
這道題挺簡單的,就是統計名字數量而已。純粹就是這道題的題目讓我虎軀一震,挺有意思的哈哈哈
情人節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;
}