Programming

2. Then it should prompt the user for the input file name of the file containing the data to sort.
3. If the program can't open the file or if no file name is entered (^d or ^z is entered for EOF), it should print an error message and exit.
4. The file will contain numbers that could be positive or negative integers or floating point numbers two numbers to a line.
5. The program should only handle the first 90 numbers in the file.
6. The program should read the numbers from the file into an array and then sort in ascending order (low to high) them.
7. If the program encounters a non-numeric value in the file, it should print an error message indicating the line number of the line containing the error and discard that input line in the file and go to the next line.
8. The program should print the sorted list of numbers, four numbers to a line in columns fifteen characters wide with four digits to the right of the decimal point.
9. After printing the sorted list, it should print:
o There were <number> numbers found in file <file name>.
o The largest number found was: <number>
o The smallest number found was: <number>
o The average of the values is: <number>
10. If there are no numbers in the file, the program should only print the following line
o There were 0 numbers found in file <file name>.
11. Include comments in your code (see project two for the required comment block formats) to explain what the code does.
12. See the examples below for spacing and formatting.
13. Your program should be well structured. The work should be done in functions, not in main. Include at least four functions that you will define.
14. The program can not use global variables except for a debug variable.

  1. 👍 0
  2. 👎 0
  3. 👁 428
  1. And the question is?

    Sra

    1. 👍 0
    2. 👎 0
  2. You better specify the programming language.

    1. 👍 0
    2. 👎 0
  3. Programming language is C

    1. 👍 0
    2. 👎 0
  4. What have you done so far, and what problems are you encountering?

    1. 👍 0
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. C++

    // Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert

    asked by Frank on September 23, 2016
  2. Ic

    Write an application that prompts the user for two integers and then prompts the user to enter an option as follows: 1 to add the two integers, 2 to subtract the second integer from the first, 3 to multiply the integers, and 4 to

    asked by Souad on April 24, 2016
  3. programming logic raptor

    1. a.input names of students from the user, terminated by "zzz", 0,0,0, and create a data file grades with records of the following form: student (string), test1 (integer), test2(integer), test3 (integer) b. display the contents

    asked by gregg hedley on November 30, 2012
  4. Ed. Tech

    When you save documents, it is important to check the blank at the top of the navigation window to ensure you are saving your file in the correct location. A. address bar B. insert ribbon C. file type D. file name Is the answer D?

    asked by Gwen on September 10, 2014
  5. Programming and algorithms

    For each of the following problems, use the top-down modular approach and pseudocode to design a suitable program to solve it. 1. Input names of students from the user, terminated by ZZZ, and create a data file GRADES with records

    asked by surfer_wf on June 2, 2010
  1. Intro to computer

    you want ghost your network's computers with a fresh desktop that features Windows 8, as your computer currently using windows 7. You will use Norton Ghost to do this. What source will Norton Ghost utilize to install Windows A.

    asked by sue on June 2, 2014
  2. computer science

    write a program that calculates a customer's monthly bill. it should input customer name, which package the customer has purchased, and how many hours were used. it should then create a bill that includes the input informtion and

    asked by jay on March 10, 2010
  3. Microsoft word

    Suppose you want to delete an existing file from within Word. What would you do? A. Open the file in Word, click on Save As, and save the file to the Recycle Bin. B. Click on the File button, choose Save As, find the file, right

    asked by Daniela on July 17, 2016
  4. offfice finaces

    Using your computer software, you create a new file for an existing customer. When you're finished, you should A. coordinate the old and new files by giving both the same name. B. overwrite the existing file by giving the new file

    asked by Sofiya on September 29, 2013
  5. Science

    If you scratch a penny with an steel file, will the copper of the penny rub off on the file, or the steel (iron) of the file rub off on the penny? 12. What can we determine from the above experiment about the relative hardness of

    asked by Please help on March 17, 2018
  6. EdTech

    Why might you need to convert a file to another file type? A. It is a music or image file. B. The file is old. C. The file uses a type of software that your computer cannot open. D. The file was sent to your e-mail.

    asked by Anonymous on January 29, 2020

You can view more similar questions or ask a new question.