Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef int Boolean;
- #define TRUE 1
- #define FALSE
- struct data{
- float key;
- //...
- };
- Boolean sequential_search(struct data * V, int N, struct data target){
- Boolean found = FALSE;
- int count = 0;
- while(count<N && found==FALSE){
- if(V[count].key == target.key)
- found = TRUE;
- else
- count++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement