Generate an array of 500 numbers between 1-1000

Generate an array of 500 numbers between 1-1000.
Sum the even numbers and display the total sum, sum the odd numbers and display the total sum.
Display a count of even numbers and odd numbers.

Total Count
Even numbers xxxxx xxxx
Odd numbers xxxxx xxxx
Total xxxxx xxxx

Create an array of pointers to the numbers in the array and create the same table using the pointers to read the values in the array.
bugdray55s homework assignment wrote:
Generate an array of 500 numbers between 1-1000.
I generated the number 2 500 times.
bugdray55s homework assignment wrote:
Sum the even numbers and display the total sum
1000
bugdray55s homework assignment wrote:
sum the odd numbers and display the total sum
0
bugdray55s homework assignment wrote:
Display a count of even numbers and odd numbers
500, 0
bugdray55s homework assignment wrote:
Create an array of pointers to the numbers in the array and create the same table using the pointers to read the values in the array.
Oh, whoops - I don't have that many fingers. Sorry. :(
Topic archived. No new replies allowed.