#include <iostream.h> #include <conio.

h> void main() { int a; int num[5]; for(int x=0;x<5;x++) cin>>num[x]; cout<<"pls enter a number"<<endl; cin>>a; for(int i=0; i<5; i++) if (a==num[i]) cout<<"Num found on "<<i+1<<" location"<<endl; else {cout<<"not found"; break;} }

Sign up to vote on this title
UsefulNot useful