#include <stdio.h>
#include <string.h>
char *p[][2]={
"red","hot",
"green","peace",
"blue","suck",
"yellow","bright",
"white","pure",
"",""};
int main(void){
int x;
char color[90];
printf("enter a color:\n");
gets(color);
for(x=0;*p[x][0];x++)
{if (!strcmp(p[x][0],color))
printf("%s is %s.",color,p[x][1]);
}
return 0;
}
歡迎光臨 code.club (https://code.club/) | Powered by Discuz! X3.2 |