Question: I just need 5,6, and 7 please The programming language is C++ using Cygwin softeware Answer the questions below in a typed document, numbered appropriately.

I just need 5,6, and 7 please
The programming language is C++ using Cygwin softeware
Answer the questions below in a typed document, numbered appropriately. Print out this sheet as a cover page. Bring the completed assignment to your next lab class. 1) Write a declaration statement for a 1-D array called timedata with a length of n, where n is a pre-declared integer variable. (In other words, n has already been declared in advance.) (Remember, you cannot initialize variable-length arrays in a declaration statement) Write a declaration statement for a 2-D array called wavedata with a width of 2 and a length of 10 2) 3) Write the same declaration, but for a 2-D array with a width of 2 and a length of n. 4) Write the declaration statement for a file pointer to represent wave data, and then write a file assignment statement for that pointer that opens a file, defined as a symbolic constant FILENAME, as a read file. 5) Write a for loop that will run a total of n times, and in each iteration will read three floating point values from the pointer declared in the last question, storing the first in the array timedata subscript (0) to (n-1). 6) Write a for loop that will run a total of n times. Use this loop to add up the values of each column of wavedata, and then find the average of each column. 7) Write a statement that calculates the percent error between variables containing amplitude data for two separate waves. A- B ATB * 100% Percent Difference B (4,5)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
