2
Answers

what's he error in this program:

Abhishek  Jaiswal

Abhishek Jaiswal

10y
1k
1
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)