#include #include #include "conflicting.h" #define A_SZ 10 #define B_SZ 12 void fillRandomly(int List[], int Size, unsigned int UB); void printArray(int List[], int Size); int main() { int A[A_SZ], B[B_SZ]; fillRandomly(A, A_SZ, 50000); fillRandomly(B, B_SZ, 100000); printf("A: "); printArray(A, A_SZ); printf("B: "); printArray(B, B_SZ); int lo = 10000, hi = 20000; setBounds(lo, hi); // count values in A[] that are between the bounds set above: int inBetween = countBetween(A, A_SZ); printf("There are %d values in A between %d and %d.\n", inBetween, lo, hi); // find the largest value in B[]: int maxB = findMax(B, B_SZ); printf("The maximum value in B is %d.\n", maxB); // count values in B[] that are between the bounds set above: inBetween = countBetween(B, B_SZ); printf("There are %d values in B between %d and %d.\n", inBetween, lo, hi); return 0; } void fillRandomly(int List[], int Size, unsigned int UB) { for (int i = 0; i < Size; i++) { List[i] = rand() % UB; } } void printArray(int List[], int Size) { for (int i = 0; i < Size; i++) { printf(" %d", List[i]); } printf("\n"); }