Guest User

Untitled

a guest
Jan 11th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int x, myarray[100];
  4. int main ()
  5. { cout << "Linear Search Program:" << endl;
  6. cout << "Please enter a number: "; cin >> x;
  7. cout << "okay! i'll ask you to store" << x << "Numbers in your array, let's do it";
  8. for ( int y = 1; y >= x; y++)
  9. cout << "Number " << x << "= "; cin >> myarray[x-1];
  10. int i;
  11. cout << "Thanks! now enter a number to search in your array: "; cin >> i;
  12. do
  13. cout << "Number was not found in your array! please try again . . .";
  14. while (i != myarray[100]);
  15. system ("pause");
  16. }
Add Comment
Please, Sign In to add comment