实验十一

知识点:if(a[i]>a[i+1])
{
t=a[i];
a[i]=a[i+1];
a[i+1]=t;

int i, x, tmp;

    while(1){
        for(i = 1; i <= 10; ++i)
            scanf("%d", arr+i);
        scanf("%d", &x);
 
        tmp = search(arr, N, x);
        if(tmp > 0)
            printf("%d\n", tmp - 1);
        else
            printf("Not found\n");
posted @ 2016-12-07 10:29  上衫亚香  阅读(138)  评论(1编辑  收藏  举报