Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. int busca_b (int v[], aluno chave.ra, int de, int ate) {
  2. int meio, media;
  3. if (de>ate){
  4. return -1;
  5. }
  6. meio = de + (ate - de)/2;
  7. if(v[meio]==chave){
  8. return meio;
  9. }
  10. if(chave < v[meio]){
  11. return busca-b (v,chave,meio+1,ate);
  12. }
  13. else{
  14. return busca-b(v,chave,meio+1,ate);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement