0

What problem in this programme?

#include <iostream.h> #include <conio.h> Void main() { Clrscr(); int list[10],i,item,flag; Cout<<"Enter the elements of the list"; For(i=0;i<=9;i++) Cin>>list[i]; Cout<<"Enter the element to be search"; Cin>>item ; For(i=0;i<=9;i++) { if(item==list[i]) { Flag=1; Cout<<"Element is found at "<<i+1<<"position"<<endl; } } if(flag==0); Cout<<"Element is not found in the list"; getch(); }

12th Mar 2018, 8:16 AM
Paras Pachauri
Paras Pachauri - avatar
1 Antwort