subject

Write a program that lets the user enter a charge account number. Be sure to include comments throughout your code where appropriate. The program should determine if the number is valid by checking for it in the following list of valid account numbers: 8149420 5333174 3080098 6755963 9526981 4449539 9387197 5104726 2931356 4282637 1750219 6086650 3164838 2419590 4578589 9718904 6749941 2545408 Initialize a one-dimensional array with these values. Then use a simple linear search to locate the number entered by the user. If the user enters a number that is in the array, the program should display a message indicating that the account number is valid. If the user enters a number not in the array, the program should display a message indicating it is invalid. Next, using the same one-dimensional array, use a bubble-sort to put the array in order and perform a binary search to locate the number entered by the user. If the user enters a number that is in the array, the program should display a message indicating that the account number is valid. If the user enters a number not in the array, the program should display a message indicating it is invalid.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag.e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
You know the right answer?
Write a program that lets the user enter a charge account number. Be sure to include comments throug...
Questions
question
Computers and Technology, 25.11.2019 02:31
question
Mathematics, 25.11.2019 02:31
question
Chemistry, 25.11.2019 02:31
question
Computers and Technology, 25.11.2019 02:31
question
Computers and Technology, 25.11.2019 02:31
question
History, 25.11.2019 02:31
Questions on the website: 13722360