Question: L Your task is to create an array of integers named even with the length specified by the size variable entered by the user.

L Your task is to create an array of integers named even with the length specified by the size variable entered by the user. You then need to populate that array with all positive even integers, starting at 2, until you have filled the array. You should then print out the resulting array using the print statement provided for you. You can move this array print line if needed. If the size entered by the user is not between 0 and 10 inclusive, you should print Invalid Size.. The name of the array is important! It must match exactly the name specified above (i.e. even). E.g. If the user enters 5, your even array should hold the values [2, 4, 6, 8, 10]. Example I/O (The numbers in bold and italics below are examples of user input): Please enter the array length: 10 Your even array is [2, 4, 6, 8, 10, 12, 14, 16, 18, 29]. Please enter the array length: 1 Your even array is [2]. Please enter the array length: 5 Your even array is [2, 4, 6, 8, 10]. Please enter the array length: 11 Invalid Size.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
