franciscominajas

Secuencial

Sep 12th, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. int busquedaSecuencial(int arreglo[], int dato)
  2. {
  3.     int i=0;
  4.     for(i=0;i<=20;i++)
  5.     {
  6.         if(arreglo[i]==dato)
  7.         {
  8.              printf("pos %d\n", i);
  9.              return dato;
  10.         }
  11.         else
  12.         {
  13.         }
  14.     }
  15.    
  16. }
Advertisement
Add Comment
Please, Sign In to add comment