#include <stdio.h>
#include <stdlib.h>
int main()
{
char array[][20]={"bear","032125678",
"ss","0226713456",
"yy","075534321"};
char scan_string[10];
int i=0;
int j=0;
int rval;
printf("Please input name : ");
scanf("%s",scan_string);
for(i=0;i<=6;i++)
{
rval = strcmp(scan_string,array[i]);
if(rval ==0)
printf("%s phone number is %s",array[i],array[i+1]);
}
system("pause");
}
沒有留言:
張貼留言