Reference no: EM13937865
Consider the following function main:
int main ()
{
Int inStock [10] [4];
Int alpha [20];
Int beta [20];
Int gamma [4] = {11, 13, 15, 17};
Int delta [10] = {3, 5, 2, 6, 10, 9, 7, 11, 1, 8};
.
.
.
}
a) Write the definition of the function setZero that initializes any one-dimensional array of type int to 0.
b) Write the definition of the function inputArray that prompts the user to input 20 numbers and stores the numbers into alpha.
c) Write the definition of the function doubleArray that initializes the elements of beta to two times the corresponding elements in alpha. Make sure that you prevent the function from modifying the elements of alpha.
d) Write the definition of the function copyGamma that sets the elements of the first row if inStock to gamma and the remaining rows of inStock to three times the previous row of inStock. Make sure that you prevent the function from modifying the elements of gamma.
e) Write the definities of the function copyAlphaBeta that stores alpha into the first five rows of inStock and beta into the last five rows of inStock. Make sure that you prevent the function from modifying the elements of alpha and beta.
f) Write the definition of the function printArray that prints any one-dimensional array of type int. Print 15 elements per line.
g) Write the definition of the function setInStock that prompts the user to input the elements for the first column of inStock.
The function should then set the elements in the remaining columns to two times the corresponding element in the previous column, minus the corresponding element in delta.
h) Write C++ statements that call each of the functions in parts a through g.
i) Write a C++ program that tests the function main and the function discussed in parts a through g. Add additional functions, such as print a two-dimensional array, as needed.
What must the risk-free rate
: A stock has an expected return of 15.1 percent, a beta of 1.60, and the expected return on the market is 11.40 percent. What must the risk-free rate be?
|
What effective annual interest rate does the firm earn
: What effective annual interest rate does the firm earn when a customer does not take the discount? What effective annual interest rate does the firm earn if the terms are changed to 3.4/7, net 30, and the customer does not take the discount. What eff..
|
Calculate the earnings per share the company would report
: Calculate the earnings per share the company would report on the income statement assuming Ski Daddle had 100,000 shares of common stock outstanding during the year and paid preferred dividends of $15,000.
|
What is the name header file (name.h)
: getFirstLast Function: it returns the first and middle name and last name in order.
|
Write the definitions of the functions
: Write the definition of the function setZero that initializes any one-dimensional array of type int to 0.
|
E-portfolio assignment aims
: The e-portfolio assignment aims to enhance your weekly learning and teaching as per the weekly topic and maximise your engagement with the course resources (please see weekly topics under Schedule in this course profile).
|
Making a living or working yourself to death
: Making a living or working yourself to death? Exploring the brave new world of work
|
Describe the use of the four management styles in management
: In this discussion forum: Describe the use of the four management styles in the management of your personal life as it relates to this class. How does this translate to other projects, programs, and/or business operations and specifically to team ..
|
Recent developments in e-business industry
: 1. Articulate the recent developments in e-business industry and its likely future directions. 2. Compare and explain various types of e-business infrastructure technologies, business models, and payment and security systems in a corporate setting.
|