#include
int search(int key,int shuzi[],int length_shuzi) { int result = -1; int control; for (control = 0;control <length_shuzi;control++) { if (key == shuzi[control]) { result = control; break; } }
return result;
}
int main(void) { //int shuzi[] = {1,2,3,}; //char *zimu[] = {"one","two","third"}; //long long length_shuzi = sizeof(shuzi)/sizeof(shuzi[0]);
struct {
int shuzi;
char *zimu;
} shuzu[] = {
{1,"one"},
{2,"two"},
{3,"third"}
};
int key;
scanf("%d",&key);
//int result =search(key,shuzi,length_shuzi);
for (int control = 0;control < sizeof(shuzu)/sizeof(shuzu[0]);control++) {
if (key == shuzu[control].shuzi) {
printf("%s\n",shuzu[control].zimu);
}
}
return 0;
}