by Dinesh Thakur Category: C Programming (Pratical)

 

 

#include<stdio.h>

main()
{
  int a[5],i,num;
  clrscr();
  for(i=0;i<=4;i++)
    {
      printf("enter the values of 1st matrix=");
      scanf("%d",&a[i]);
    }
    printf("enter the value you want to search");
    scanf("%d",&num);
      for(i=0;i<=4;i++)
         {
            if(num==a[i])
              {
                 printf("number is present=%d",num);
                 break;
              }
         }
         if(i>4)
         printf("number is not present");
 getch();
}
 
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content