Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment you will write a small Cprogram to a) evaluate an equation fx) over a range of x valucs (Xmn, Xmax) and display

image text in transcribed
image text in transcribed
In this assignment you will write a small Cprogram to a) evaluate an equation fx) over a range of x valucs (Xmn, Xmax) and display a table like the one shown below, b) find the minimum, maximum, mean, median, mode and range values of fx). The user will enter the values for Xmin and Xmax, the program submitted as a standard C++ source code file. Also submit a Text/Word/PDF document with a sample table output, instruction to compile/run and use your program. You can cither submit these files separately or zipped together into one file. There are no specific naming conventions. should show at least 21 rows in the table. The C++program s should be Please note that the computer program should comply with the commenting and formatting rules as has been done in class. For example, there should be a header for the whole program that gives the author's name, class name, date, and description. There are alignment and indenting requirements as discussed. Please ask if you have any questions. Program #1 A) Your first program is a simple mathematical calculation program. The program will take inputs from the user. Evaluate fx) and display the results in a table. The inputs from the user will be two doubles Xmin and Xmax. A symbolic constant (POINTS) is used to determine the number of rows on the table. The equation is the sum of two cosine functions; f(x)-(1/32) *2*pitsin(6.0361x) + (1/64) *p: "cos (24.44%); Fquation ( 1 ) Hint You may use the function sin/cos found in , in your calculations. The value for pi is a named constant, and its value is 3.1416; i) 3 points) Define a symbolic constant (POINTS) to set the number of rows to 21, ii) (3 points) Ask the user for the values of Xmin and Xnax 10 points Using the three values above(POINTS, Xmin and Xax) compute the values for increments on x (column labcled as X-Valuc); iv) 10 points) Use Equation 1 to compute the values of f (x)(column labeled as Y-Value), and store it in an array dataPoints; (14 points) Display a table with the following format (alignment and precision is set) For cxample, assume the user enters Xmin--4 and ax 4; then your program should display v) a table like TABLE

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions