Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C. The algorithm to generate the trendline of a set of points is: Generate Trendline Calculate the slope Calculate the y intercept Trendline is

In C.image text in transcribed

The algorithm to generate the trendline of a set of points is: Generate Trendline Calculate the slope Calculate the y intercept Trendline is y slopex+y_intercept (y mx+b form) Calculate the Slope Set sum_xy to zero Set sum x to zero Set sum y to zero Set sum x sq to zero Set qty to the number of points in the set For each point sum x += x sum -y-y Set slope to ((aty sum_xy) -(sum_xsum_V((ty sum_x_sq) -(sum_x')) Calculate the y_intercept y intercept-mean of y slope mean of x Mean of a set of numbers /left to the user to complete Sum of a set of numbers left to the user to complete Write a program which accepts 20 points fram the user and generates the trendline. The 20 points must be stored in an array of structs using the following definition: typedef struct double x; double y )Point t; Follow the process: Restate the problem Clearly identify the inputs and the outputs Create the algorithm to solve the problem (i.e. generate the pseudocode-you may use the above pseudocode as a starting point, though don't forget the attribution if you do) Test the pseudocode Write the program Test the program with good input values A. B. C. D. E. F

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

Students also viewed these Databases questions