Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED ASAP! PROBLEM STATEMENT BY USING [C+++] Given two arrays: int list1[] = {90, 20, 80, 60, 10}; int list2[] = {90, 200, 820,

I NEED ASAP!

PROBLEM STATEMENT BY USING [C+++]

Given two arrays:

int list1[] = {90, 20, 80, 60, 10}; int

list2[] = {90, 200, 820, 1060, 1110};

Analyse the example of execution (refer page 3 and page 4). By using modular programming, write a program that able to perform operations according to user's input. If the user enters a letter a or A, the program will performs bubble sort on list1 and display all elements in ascending order. If the user enters a letter s or S, the program will performs binary search on list2. When the user enters a letter X or x, the program will be terminated. However, if the user enters invalid choice, the program will inform the user and ask to reenter the valid input.

Example of execution:

What you want to do (A for Sort, S for Search, X for Exit the Program:)S You want to find: 1060 1060 is found at index 3

What you want to do (A for Sort, S for Search, X for Exit the Program:) a Original order: 90 20 80 60 10 Sorted Array in Ascending Order:

10 20 60 80 90 What you want to do (A for Sort, S for Search, X for Exit the Program:) c Sorry. This is an invalid choice. What you want to do (A for Sort, S for Search, X for Exit the Program:) s

You want to find: 80 Not found

What you want to do (A for Sort, S for Search, X for Exit the Program:) A Original order: 90 20 80 60 10 Sorted Array in Ascending Order:

10 20 60 80 90

What you want to do (A for Sort, S for Search, X for Exit the Program:) x Thank you! Have a nice day!

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions