标签:
3 basketball fork chopsticks 2 bowl letter
fork chopsticks bowl
#include<stdio.h> #include<string.h> int main() { int n,m,j,i,sum; char s[110][1100]; char a[4][15]={"bowl","knife","fork","chopsticks"}; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) { scanf("%s",s[i]); } for(i=0;i<n;i++) { for(j=0;j<4;j++) { if(strcmp(s[i],a[j])==0) { printf("%s ",a[j]); } } } printf("\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/tonghao/p/4555904.html