I lost my notes about this one and my classmates are really useless because they don't copy a damn simple code. My teacher said find it out and it's been my second day answering and still i cant find/solve/code it.

so here you go guys please help me, Requirements:
Make the user prompt 5 numbers, the 5 numbers passes through an array, then let the user prompt 1 number to be searched either its one of the 5 numbers or not. If the number is in the array it displays "Num. is in the Array", if not in array "Num. is not in the Array".

my codes that i'm been tackling:
Code:
main()
{
int x,i,b,a[5];
clrscr();
g(1,1);
p("Enter 5 Numbers: ");
s("%d%d%d%d%d",&a[1],&a[2],&a[3],&a[4],&a[5]);
g(1,8);
p("Search Number: ");
s("%d",&b);
x=9;
for(i=1;i<6;i++)
   {
   if(a[i]==b)
      {
      g(22,x);
      p("Number in Array");
      x++;
      }
   else
      {
      g(22,x);
      p("Number not in array");
      x++;
      }
   }
getch();
and i was sure that my teachers codes were 1/3 shorter than mines. when i try to run it, it also loops the "Number is in array" and " NUmber is not in array".

So guys this is one of the basics she said, please help me...