I'm working on a program that will generate 100 numbers in range of 1-999 and then there are few things I have to do....
Here is what I have so far and I'm hoping that someone can explain further to me...
a. Print the odd values, ten to a line
b. Return the count of the number of even values
c. Return the location of the smalles value in the array
Now, so far I got program that generates numbers, I have code that will print 10 to a line but I'm stuck on the loop that will check for odd values and print them to line... Please dissregard b and c and help me with a, I'll try to work on the rest...
Thanks a lot,
#define SIZE 100
int main (void)
int lineCount = 0;
srand(time( NULL ));
for(i =0; i < SIZE; i++)
number[i] = (int)(999*tmp+0.5);
} // Generates numbers in the range 1-999
for(i=0; i < SIZE; i ++)
if (lineCount > 9)
lineCount = 0;
} // printArray a. Print the array ten values to a line.