The program should perform the following steps: 1. Ask the user to enter integer N between 7 and 77. 2. The program should then create an array (not a list) of size N 3. The program then should create N random numbers between 1 and 100. Assume this number is called R. For each random number R A. if R is even, place the number R starting at the end of the array. B. if R is odd, the then that number is written to the array from the start index 0. C. continue until the all random numbers are generated 4. The program should print out the array at the end 5. Program will exit • Make sure you comment your program in your source code file. • Make sure you clean extra comments • Make sure you use the best practices in writing your program o Example:Prompt the user with a message for the input o Use methods rather than eveything in Main. o Variables names and methods names (identifiers) should semantically reflect their purpose Catch any runtime error (if any)
The program should perform the following steps: 1. Ask the user to enter integer N between 7 and 77. 2. The program should then create an array (not a list) of size N 3. The program then should create N random numbers between 1 and 100. Assume this number is called R. For each random number R A. if R is even, place the number R starting at the end of the array. B. if R is odd, the then that number is written to the array from the start index 0. C. continue until the all random numbers are generated 4. The program should print out the array at the end 5. Program will exit • Make sure you comment your program in your source code file. • Make sure you clean extra comments • Make sure you use the best practices in writing your program o Example:Prompt the user with a message for the input o Use methods rather than eveything in Main. o Variables names and methods names (identifiers) should semantically reflect their purpose Catch any runtime error (if any)
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,