#include<stdio.h>
#include<stdlib.h>
int main()
{int i=0,t,flag=0;
int b(int flag, int i,int t);
int a[10] = { 15, 23, 67, 98, 54, 17, 6, 29, 38 };
printf("请输入一个需要查找的数:");
scanf_s("%d", &t);
{if (flag==1) printf("%d", i);
else if (flag==0)printf("该数不存在"); }
system("pause"); return 0;
}
int b(int flag, int i,int t)
{
int a[10] = { 15, 23, 67, 98, 54, 17, 6, 29, 38 };
for (i = 0; i <= 9; i++)
{
if (a[i] == t)flag = 1; break;
}
system("pause"); return (flag,i); }
vs2013
慕侠2389804
慕容708150