C language, with an integer array, another input an integer, programming to find whether this integer has appeared in the array, if so, then
There is obviously something wrong with your program. First of all, the topic requires the position where it first appears, so when you find that number, you should stop looking and use the break function. When the cycle cannot be found once, i= 10, so you should judge the relationship between I and 10, and output nofound when it is greater than or equal to 10. I don't understand why I have to compare with t, it doesn't matter.