Abhishek  Jaiswal

Abhishek Jaiswal

  • 87
  • 19.8k
  • 9.4m

what's he error in this program:

Nov 22 2013 2:16 PM
am getting ELEMENTS NOT FOUND, everytime. what's he error in this program:

#include<iostream.h> #include<stdlib.h> int main() { int a[5]={2,4,6,8,10}; int Item; int i = 0; while(i<5) { if(a[i]==Item) { cout<<Item<<"found at loc"<<i; exit(EXIT_FAILURE); } i++; } cout<<"Element not found"; }

Answers (2)