[求助]在数组中确定某一元素的位置
#include<stdio.h>
main()
{
int a[15]={100,97,91,85,76,71,66,56,45,34,24,19,15,9,1};
int b,*p;
p=a;
printf("please intput a number:(0-100)\n");
scanf("b=%d\n",&b);
for(p=a;p<a+15;p++)
{
if((*p-b)==0)
printf("in the string b is the number %d",p-a);
break;
}
if(p==a+14)
printf("error");
}