Question: The program should begin by asking the user to type in an odd number between 5 0 0 and 1 0 , 0 0 0
The program should begin by asking the user to type in an odd number between and Make sure to use input validation to confirm the number is of that size and is odd.
Then by using that number, you need to create an array of that size and fill it with random integers between and But you need to make sure that only even numbers are used, no odd numbers should be inside the array. Then after the array is filled, reset the middle number of the array to zero, replacing whatever was in there before with a
Now using this large array where the middle number is zero, you need to convert every number before the middle zero to a if the number is positive. In a similar way every number after the middle number that is negative to a
For example: If the array was size to small for the assignment, but good for an example it might start like:
But then you convert the middle number to
Now adjust all the positive numbers in the first half:
Now adjust all the negative numbers in the second half:
Now print off all the numbers of the array to the screen that are not or You should have a newline after every numbers. So your output might look like:
Note the lack of s
Finally write the entire array skipping nothing to a file called numberDatatxt;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
