Question: In C++, needs to run on visual studios Program 1-Bubble sort Given an input file prog2 input.txt with 10 random numbers, one number per line,

 In C++, needs to run on visual studios Program 1-Bubble sort
In C++, needs to run on visual studios

Program 1-Bubble sort Given an input file prog2 input.txt with 10 random numbers, one number per line, write a program that would save those numbers into an array. Sort the numbers in decreasing order using the bubble sort algorithm. Write the sorted numbers to a file named prog2_output.txt. Also, count and show the number of comparisons that your program does. Program 2-Selection sort Develop a terminal application that accomplishes the same requirements described on Program 2, but using the selection sort algorithm instead. Also, name the files prog3 input.txt and prog3 output.txt instead. You need to submit the following: 1. Input File 2. Output File 3. Code 4. Output Screenshot showing number of comparisions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!