#include <stdio.h> #include <stdlib.h> int main() { int i,n,j; printf("Enter the size of array\n"); scanf ("%d",&j); int a[j]; printf("Enter the elements of array\n"); for (i=0;i<j;i++) scanf ("%d",&a[i]);
printf("Enter the number to find in array\n"); scanf ("%d",&n);
for (i=0;i<j;i++) { (a[i]==n)?printf("%d is present is array at %d index of array\n",n,i):continue; /* if(a[i]==n) {i printf("%d is present in array at %d index of array.\n",n,i); exit (0); } else continue; */ } printf("Entered number not found in array\n");