Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need to solve ALL FOUR programs for my c for engineers class Using code blocks maximum, minimum, totalodds, and totalEvens. PE 06 02 (Bublle Sorting

image text in transcribedNeed to solve ALL FOUR programs for my c for engineers class
Using code blocks
maximum, minimum, totalodds, and totalEvens. PE 06 02 (Bublle Sorting Arrays) Prompt the user to enter a valid seed value (0 to 65535) for the srand0 function, then create a random amay with 10 integers that range from 1 to 88. The program should display the original random array to the screen. Use the bubble sort routine discussed in class to sort the array. The program should display the array, current pass number, and the total number of swaps made for each pass. Bonus (+5: Make this a sentinel-controlled program. PE 06.03 Linear Searching Arrays) Generate a random array with 15 integers from 50 to 99. Prompt the user to enter a valid integer search ey" between 50-99 and verify the user input. Use the linear search algorithm discussed in class to find the "key" value and array index location of the "key" value. If no value was found prompt the user to enter another number until a value is found. Display the random array to the screen only after the user finds a correct value for comparison. 4) PE 06 04 (Binary Searching Arrays) Generate a random array containing 15 integers from 10 to 25. Prompt the user to enter a valid integer "key" between 10 25 and verify the user input. Use the binary search algorithm discussed in class to find the value and location of the "key" value. If no value was found prompt the user to enter another number until a value is found. Display the random anray to the screen only after the user finds a correct value for 5) PE 06 05 (Two-by-Two Arrays) Create a two-by-two amay A using random integers from l to 10. Create a two-by-two array Busing random integers from -10 to 0. Combine the elements of A Busing a for loop to create array C A+ B. Display array A. B and C to the screen for comparison. (Note that the sum of each element of A and B yields the corresponding element of C. c[e][e] a[e][e]+b[e][ej, etc.) a Page 2 2 MacBook Air

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions

Question

Use internal communication to shine

Answered: 1 week ago