先声明一下,这是一篇水帖。
百家姓(4)
今天还是今天,不过我觉得今天不是今天,因为我集齐了好像是 100个 26个姓氏了!所以今天还是今天。咦,似乎哪里说错了?
不管了,代码如下:
#include<bits/stdc++.h>
using namespace std;
string a;
int main() {
int xunhuan = 0;
while (xunhuan = 1) {
cin >> a;
string b = "zeng";
string c = "jiang";
string d = "zhou";
string e = "yan";
string f = "yao";
string g = "xu";
string h = "zhu";
string i = "huang";
string j = "meng";
string k = "pan";
string l = "fang";
string m = "zhao";
string n = "qian";
string o = "li";
string p = "wu";
string q = "zheng";
string r = "wang";
string s = "feng";
string t = "chen";
string u = "chu";
string v = "wei";
string w = "jiang";
string x = "shen";
string y = "han";
string z = "yang";
string::size_type idx;
idx = a.find(b);
if (idx == string::npos )
cout << "";
string::size_type idx_b;
idx = a.find(c);
if (idx_b == string::npos )
cout << "";
string::size_type idx_c;
idx = a.find(d);
if (idx_c == string::npos )
cout << "";
string::size_type idx_d;
idx = a.find(e);
if (idx_d == string::npos )
cout << "";
string::size_type idx_e;
idx = a.find(f);
if (idx_e == string::npos )
cout << "";
string::size_type idx_f;
idx = a.find(g);
if (idx_e == string::npos )
cout << "";
string::size_type idx_g;
idx = a.find(h);
if (idx_e == string::npos )
cout << "";
string::size_type idx_h;
idx = a.find(i);
if (idx_e == string::npos )
cout << "";
string::size_type idx_i;
idx = a.find(j);
if (idx_e == string::npos )
cout << "";
string::size_type idx_j;
idx = a.find(k);
if (idx_e == string::npos )
cout << "";
string::size_type idx_k;
idx = a.find(l);
if (idx_e == string::npos )
cout << "";
string::size_type idx_l;
idx = a.find(m);
if (idx_e == string::npos )
cout << "";
string::size_type idx_m;
idx = a.find(n);
if (idx_e == string::npos )
cout << "";
string::size_type idx_n;
idx = a.find(o);
if (idx_e == string::npos )
cout << "";
string::size_type idx_o;
idx = a.find(p);
if (idx_e == string::npos )
cout << "";
string::size_type idx_p;
idx = a.find(q);
if (idx_e == string::npos )
cout << "";
string::size_type idx_q;
idx = a.find(r);
if (idx_e == string::npos )
cout << "";
string::size_type idx_r;
idx = a.find(s);
if (idx_e == string::npos )
cout << "";
string::size_type idx_s;
idx = a.find(t);
if (idx_e == string::npos )
cout << "";
string::size_type idx_t;
idx = a.find(u);
if (idx_e == string::npos )
cout << "";
string::size_type idx_u;
idx = a.find(v);
if (idx_e == string::npos )
cout << "";
string::size_type idx_v;
idx = a.find(w);
if (idx_e == string::npos )
cout << "";
string::size_type idx_w;
idx = a.find(x);
if (idx_e == string::npos )
cout << "";
string::size_type idx_x;
idx = a.find(y);
if (idx_e == string::npos )
cout << "";
string::size_type idx_y;
idx = a.find(z);
if (idx_e == string::npos )
cout << "";
else cout << "存在" << endl;
if (a >= "a" && a <= "z")
a[0] -= 32;
if (a[0] == 'z')a[0] = 'Z';
cout << a << endl;
}
}
我觉得今天不是今天,因为我集齐了好像是 100个 26个姓氏了!所以今天还是今天。
你的因为那句到底是今天不是今天的还是今天还是今天的