先声明一下,这是一篇水帖。
也不知道该说啥了。。。
上代码吧:
#include<bits/stdc++.h>
using namespace std;
string a;
int main() {
int xunhuan = 0;
printf("如果在已设定好的姓的区域内,则输出“存在”,第一个字母大写,\n否则输出“不存在”。\n");
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 = "su";
string x = "shen";
string y = "han";
string z = "yang";
string a_1 = "zhu";
string b_1 = "qin";
string c_1 = "you";
string d_1 = "he";
string e_1 = "lu";
string f_1 = "shi";
string g_1 = "zhang";
string h_1 = "kong";
string i_1 = "cao";
string j_1 = "yan";
string k_1 = "hua";
string l_1 = "jin";
string m_1 = "wei";
string n_1 = "tao";
string o_1 = "wei";
string p_1 = "xie";
string q_1 = "zou";
string r_1 = "yu";
string s_1 = "bai";
string t_1 = "shui";
string u_1 = "dou";
string v_1 = "zhang";
string w_1 = "yun";
if (a == b)
cout << "存在" << endl;
if (a == c)
cout << "存在" << endl;
if (a == d)
cout << "存在" << endl;
if (a == e)
cout << "存在" << endl;
if (a == f)
cout << "存在" << endl;
if (a == g)
cout << "存在" << endl;
if (a == h)
cout << "存在" << endl;
if (a == i)
cout << "存在" << endl;
if (a == j)
cout << "存在" << endl;
if (a == k)
cout << "存在" << endl;
if (a == l)
cout << "存在" << endl;
if (a == m)
cout << "存在" << endl;
if (a == n)
cout << "存在" << endl;
if (a == o)
cout << "存在" << endl;
if (a == p)
cout << "存在" << endl;
if (a == q)
cout << "存在" << endl;
if (a == r)
cout << "存在" << endl;
if (a == s)
cout << "存在" << endl;
if (a == t)
cout << "存在" << endl;
if (a == u)
cout << "存在" << endl;
if (a == v)
cout << "存在" << endl;
if (a == w)
cout << "存在" << endl;
if (a == x)
cout << "存在" << endl;
if (a == y)
cout << "存在" << endl;
if (a == z)
cout << "存在" << endl;
if (a == a_1)
cout << "存在" << endl;
if (a == b_1)
cout << "存在" << endl;
if (a == c_1 )
cout << "存在" << endl;
if (a == d_1)
cout << "存在" << endl;
if (a == e_1)
cout << "存在" << endl;
if (a == f_1)
cout << "存在" << endl;
if (a == g_1)
cout << "存在" << endl;
if (a == h_1)
cout << "存在" << endl;
if (a == i_1)
cout << "存在" << endl;
if (a == j_1)
cout << "存在" << endl;
if (a == k_1)
cout << "存在" << endl;
if (a == l_1)
cout << "存在" << endl;
if (a == m_1)
cout << "存在" << endl;
if (a == n_1)
cout << "存在" << endl;
if (a == o_1)
cout << "存在" << endl;
if (a == p_1)
cout << "存在" << endl;
if (a == q_1)
cout << "存在" << endl;
if (a == r_1)
cout << "存在" << endl;
if (a == s_1)
cout << "存在" << endl;
if (a == t_1)
cout << "存在" << endl;
if (a == u_1)
cout << "存在" << endl;
if (a == v_1)
cout << "存在" << endl;
if (a == w_1)
cout << "存在" << endl;
if (a >= "a" && a <= "z")
a[0] -= 32;
if (a[0] == 'z')a[0] = 'Z';
cout << a << endl;
}
}
大家好,我是来做挑战的(看主页第一条),你们只要把我当空气就行,如果实在很介意,请私信或在评论区跟我说,我会删掉的!
你的if把我吓到了……但是这个
更新了那么久好像没啥东西