Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*Draw a flowchart, using Microsoft Visio or LucidChart, to document the logic required to complete this program. Save the flowchart as a PDF file. *Develop

*Draw a flowchart, using Microsoft Visio or LucidChart, to document the logic required to complete this program. Save the flowchart as a PDF file.

*Develop a C++ program, following the logic in your flowchart, to generate a table of calculated values. The table must be represented in memory as seven arrays one per column in the output table.

*Ask the user for three numbers:

1.The first number represents how many rows are to be in the table (1 to 25).

2. The second number represents the first value in the first column of the table. (-1000 to +1000)

3.The third number represents the increment between successive values in the first column of the table. (10 to 20)

*Iterate through the values in the first column, generating and saving the following derived values from each value in the iteration. Each calculated value must be saved in the proper row of its designated array.

-Square (Write a new function to calculate this value). Type is double.

-Square Root (Use the built-in sqrt() function to calculate this value.) Type is double.

-Cube (Write a new function to calculate this value.) Type is double. o Cube Root (Use the built-in pow() function to calculate this value). Type is double. o Whether the number is even or odd (Write a new function to determine this value). Type is bool.

-Whether the number is prime or not (Use the function developed for HW5). Type is bool.

*Each user-defined function listed above should have a prototype like double calcCube(int x); for the Square, Square Root, Cube, and Cube root calculations, and like bool isEven(int x); for the Even and Prime evaluations. In all cases, the parameter x is the value in the corresponding row of the first column.

*Save the results of the calculations in a set of arrays, one array for each of the six calculated/derived values.

*After all values are calculated and saved, then display the values in a tabular form with one column for each calculated value and a row for each set of values.

*For each negative value in the first column, display N/A in the columns for square root and cube root.

*Display Even or Odd for each numbers even/odd status. Display True or False for the numbers primeness.

*Repeat this process, creating and displaying tables, until the user enters a count of zero for the number of rows in the 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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

ISBN: 0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

d. How will lack of trust be handled?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago