@VishalChoudhary/

ImpoliteSilentOpentracker

C

No description

fork
loading
Files
  • main.c
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>

int main(void) {

  int i = 0,elem,myArray[100];

   while(i<=15){

    printf("Enter the element you want to add : ");
    scanf("%d",&myArray[i]);
    i++;
  }

  printf("which element you want to search for : ");
  scanf("%d",&elem);

  for(int x  = 0;x < 15;){
    if (myArray[x]==elem){
      printf("the element has index %d \n",x);
      break;
    }
    else{
	x++;

    }
  }
}