Write a code that declare and initialize an array of 10 elements and display the total number of even numbers available in the array.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Question No.1) Write a program that execute first part if user press 1 and execute second part if user press 2.
|CLO2-PLO2]
Recall the 1D array and functions concepts that we learned then write a program using those
concepts. Declare two 1D arrays first (Array1) of n elements and second (Array2) of m elements.
Then input values from user and stored in both arrays (first enters in first array and after that enter
in second array). The values you entered in both arrays should be in descending sorted order. After
you entered values Declare third (Array3) 1D array of size n+m. Then pass these all three arrays
to a function Combine_Arrays () which stores the values of Array1 and Array2 in Array3 in
descending sorted order. The example is given below:
Let n = 6, m= 8, Then
Array1
10 7 420 -2
Array2
13 11 9 8 5 2 1-3
After merging values of Arrayl and Array2.
Array3
13 11 10 9 875 4 2 2 10 -2
-3
Write a code that declare and initialize an array of 10 elements and display the total number of
even numbers available in the array.
Transcribed Image Text:Question No.1) Write a program that execute first part if user press 1 and execute second part if user press 2. |CLO2-PLO2] Recall the 1D array and functions concepts that we learned then write a program using those concepts. Declare two 1D arrays first (Array1) of n elements and second (Array2) of m elements. Then input values from user and stored in both arrays (first enters in first array and after that enter in second array). The values you entered in both arrays should be in descending sorted order. After you entered values Declare third (Array3) 1D array of size n+m. Then pass these all three arrays to a function Combine_Arrays () which stores the values of Array1 and Array2 in Array3 in descending sorted order. The example is given below: Let n = 6, m= 8, Then Array1 10 7 420 -2 Array2 13 11 9 8 5 2 1-3 After merging values of Arrayl and Array2. Array3 13 11 10 9 875 4 2 2 10 -2 -3 Write a code that declare and initialize an array of 10 elements and display the total number of even numbers available in the array.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY