subject

Open the file named "1234-as4input. txt" for reading. Open the file named "1234-as4output-yourlastname-yourfi rstname. txt" for writing. For instance, my test implementation will open 1234-as4output-doe-john. txt.
Input

From the input file, read:
A title line of text.
Two ordered pairs (x1, y1) and (x2, y2) of floating-point numbers. Each pair will be on one line, separated by a comma, enclosed in parentheses. You'll need to use either fscanf(), or fgets() with sscanf(), to decode these pairs.
An integer count n.
A set of n floating-point numbers, one per line. n will be less than 50.
Computation
Treat the two ordered pairs as points, and determine the slope and intercept of the line they lie on.
Treat the number set read from the file as an array of x coordinates. Compute the y coordinate of the line for each x coordinate, and store the result in an array.
Output
To the output file, write:
The title.
The original ordered pairs, and the slope and intercept computed from them.
All five sets of results, with a descriptive line before each. Include the x coordinate and the computed y value. Line up the x and y coordinates on their decimal points.
The Catch
You don’t know how many x coordinates you have until you read the file.
You'll need to use arrays to store the coordinates, use pointers to pass the coordinates, and use array-length variables to tell the functions how many you have. Be careful!
Attacking the Problem
Don't try to attack this entire program all at once. You'll fail. You need to apply the divide-and-conquer approach to problem-solving. In this case, that means:
Deal with opening and reading the input file. After that, use ordinary printf()'s with ordinary for loops to convince yourself that you've captured all the input from the file.
Deal with the calculations. Write them one at a time. Use ordinary printf()s with ordinary for loops to test each one, making sure that you're getting the results correct.
Deal with opening and writing to the output file.
Your code must compile without errors or meaningful warnings, and run with any reasonable inputs. You must follow all coding conventions that we've established. Submit only the .c file here.
Notes
Use functions wisely.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
Open the file named "1234-as4input. txt" for reading. Open the file named "1234-as4output-yourlastn...
Questions
question
Mathematics, 25.07.2019 22:00