• 2021-04-14
    下面程序用“顺序查找法”查找数组a中与x相等的第一个数。请填空。# include< stdio. h>int main( ){ int a[8]=( 25,57,48,37,12,92,86,33},i,x;scanf("%d",&x);for(i=0;i<8;i++)if(x= =a[i]){ printf("Found !The index is:%d\n",– –i);( );}if(( ))printf("Can't found! ");teturn 0;}
  • 举一反三