Reference no: EM13937557
Im having trouble writing a program that uses functions. the program uses data from a data file ("numbers.dat") and is to be written to an output file ("output2.dat"). i have already written an array based program that does what it is supposed to, now i need a function based program to do the same. i have attached a copy of my current array program. the new function program should do the following
1) print out all values in the array with no more than 5 numbers per output line
2) print out average of numbers
3) print out how many numbers are larger than the average
4) print out how many numbers are smaller than the average
5) for every odd location in the array, subtract it from the previous even location and print out values
6) print out average of new array
7) convert every negative numbers to positive numbers. print out array
8) swap the first number in array with the last number in the array and print.
9) print out average for the new array.
Attachment:- my+array+prgrm2.zip
What are the nash equilibrium prices
: Write down the expressions for how much a consumer at location d would value the products sold by firms A and B, if they set prices Pa and Pb? Based on your expressions in (a), how much will be demanded from each firm if prices Pa and Pb are set?
|
Calculate accumulated depreciation over four years
: Reversing Rapids Co. purchases an asset for $198,164. This asset qualifies as a five-year recovery asset under MACRS. The five-year expense percentages for years 1, 2, 3, and 4 are 20.00%, 32.00%, 19.20%, and 11.52% respectively. Calculate accumulate..
|
Estimate target maximum acquisition price when discount rate
: The table below shows the projected free cash flows of an acquisition target. The potential acquirer wants to estimate its maximum acquisition price at an 8% discount rate and a terminal value in year 5 based on the perpetual growth equation with a 4..
|
What is the par value of the preferred stock
: What is the par value of the preferred stock? If the total annual dividend on preferred stock is $24,000, what is the dividend rate on preferred stock?
|
Write print out average of numbers
: Im having trouble writing a program that uses functions. the program uses data from a data file ("numbers.dat") and is to be written to an output file ("output2.dat").
|
What is the maximum price acquirer should be willing to pay
: A sporting goods manufacturer has decided to expand into a related business. Management estimates that to build and staff a facility of the desired size and to attain capacity operations would cost $430 million in present value terms. What is the max..
|
Perfect cubes in two ways
: Smallest x = sum of 2 perfect cubes in two ways
|
Calculate the store total revenue, total profit
: The table below depicts the prices and total costs a local used-book store faces. The bookstore competes with a number of similar stores, but it capitalizes on its location and the word-of-mouth reputation of the coffee it serves to its customers...
|
Medication therapy for an elderly person
: Describe in detail 3 ways that medication therapy for an elderly person is different than a younger or middle-age client
|