Open Code Block IDE, create a new project. Use this project to: • Create a function named fillRand, which takes an array

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Open Code Block IDE, create a new project. Use this project to: • Create a function named fillRand, which takes an array

Post by answerhappygod »

Open Code Block Ide Create A New Project Use This Project To Create A Function Named Fillrand Which Takes An Array 1
Open Code Block Ide Create A New Project Use This Project To Create A Function Named Fillrand Which Takes An Array 1 (71.74 KiB) Viewed 36 times
Open Code Block IDE, create a new project. Use this project to: • Create a function named fillRand, which takes an array of integers and its size as an argument. The function should fill the array with random values between-100 and 100 inclusive Hint: int num = (rand() % (upper - lower + 1)) + lower • Create a function named printA that takes an array of integers and its size as an argument. The function should print the array of elements as shown in the sample output. • Create a function named sumPositive Even, that takes as an argument an array of integers, its size, and an integer value x. The function should return the summation of all even numbers in the array greater than x • Create a program that O Defines a symbolic constant named SIZE of value 5 o Using the symbolic constant SIZE, creates a 1-D array named values of floating- point numbers to store 5 elements. o Prompts the user to enter an integer value in the range -100 to 100 (inclusive), store in a variable called threshold o Uses the fillRand function to fill the array with random values o Uses the printa function to print the array o Uses the sum PositiveEven function to find the summation of even numbers in the array greater than threshold, and print the returned result o Organize the output as in the sample run Sample Output number for [0] element: -35 number for (1) element: 35 number for (2) element: 80 number for [3] element: -90 number for (4) element: 50 Please enter a threshold : 0 The summation of even numbers greater than 0 is 130 Notes: Name the project as "Lab5Ex1". Upload the project file to the elearning Unmute Start Video You are screen sharing 19 Participants Chat Mew
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply