Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. bool Busca(int x){
  2. int i = 0;
  3. for (int i=0; i < n; i++){
  4. if (v[i] == x) {
  5. return true;
  6. }
  7. }
  8. return false;
  9. }
  10.  
  11.  
  12. if (l.Busca(5)) {
  13. cout << "Elemento encontrado...\n";
  14. }
  15. else{
  16. cout<< "Elemento nao encontrado...\n";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement