Question: Task 3: Programming Exercises Instructions: Use any text editor to write and execute below exercises from the book chapter 5. Attach Snipping photos of your
Task 3: Programming Exercises
Instructions: Use any text editor to write and execute below exercises from the book chapter 5. Attach Snipping photos of your source code and execution of the code in the console. Make sure to create separate files for each exercise.
Chapter Exercises: Do the following chapter exercises.
- Exercise 23:can you Write a program that creates an array of integers and then uses a for loop to reverse the order of the elements in the array.
- Exercise 26: can you Write a program that creates two integer arrays data1 and data2, possibly of different lengths. Then it uses for loops to create a new array data3 whose length is the sum of the lengths of data1 and data2 and whose contents consist of the contents of data1 followed by the contents of data2. For example, if the two arrays are {1,2,3} and {4,5,6,7}, then the code should create the new array {1,2,3,4,5,6,7}.
- Exercise 27: can you Write a program that creates an integer array and then uses a for loop to check whether the array is sorted from smallest to largest. If so, it prints "Sorted". Otherwise, it prints "Not sorted".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
