Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Must be written in C++. Thank you! Problem 1 Overview: In this question you will write a program that reads up to 100 numbers from
Must be written in C++. Thank you!
Problem 1 Overview: In this question you will write a program that reads up to 100 numbers from a file and stores them in a sorted array, then allow the user to see if a specific number has been stored. Specifics: 1. Your program should take a single command line argument: the name of a file to read in. a. This file will need to be stored in the same directory as your program b. The file should store up to 100 integers on their own lines, with no other text. You can use the file named "assignment 1_problem_1.txt" on Moodle, or create your own if you prefer. 2. Create an array of integers to store at least 100 integers. 3. Write a function called insertlntoSortedArray. It should take three arguments - a sorted array of numbers at least 100 long, the actual number of filled entries in that array, and a new value to be added to that array. It should then insert the new value into the correct spot so that the array remains sorted. It should return the new size of the array. This function can be declared the following way: int insertIntosortedArray(int myArray[], int numEntries, int newValue)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started