Write print out average of numbers

Assignment Help C/C++ Programming
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

Reference no: EM13937557

Questions Cloud

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

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Questions related to c programming

Which statement will read a floating point value from the keyboard and store it in the variable x? A. printf("float = %f", x); B. scanf("%f", &x); C. scanf("&f", %x); D. scanf("%d", &x);

  Create a simple command line program that simulates

Instructions:  Create a simple command line program that simulates the rolling of a pair of six sided dice a user given number of times

  Multiply a set of complex numbers

Write a C program to multiply a set of complex numbers stored in an array (that has been dynamically allocated). Specifically, first prompt the user to enter how many complex numbers need to be multiplied, dynamically create an array to store the ..

  Creates a macro to calculate the area

Build a program that creates a macro to calculate the area of a circle using the formula area = pie x radius x radius. In the same program, prompt the user to enter a circle's radius. Use the macro to calculate the circle's area and display the re..

  1 write a c program to display the following sum4 812162024

1. write a c program to display the following sum4 812162024 ...4042. write a program that will convert us dollar

  Calculate and display the area of the rectangle

Calculate and display the area of the rectangle and the total price of the tile. Add comments in code section. Code this program in java programming.

  Quiz on c coding

Which of the following statements is incorrect

  Write a program to find solutions to the n-queens puzzle

Write a program to find solutions to the n-queens puzzle for various valuesof n. To be specific, test your program for n =4 and n =8.

  Execute the next line which is enter your last name

C++ in VS and I'm trying to run the following program. As soon as I put in my name after the 2nd cout statement, the program ends.

  Problem regarding the database systems

To develop a database for the given case study by drawing the EER diagram-To apply the normalization rules to the data structures and hence to show the UNF, INF, 2NF, and 3NF relations of the given scenario-To create and manipulate database.

  What does the term polymorphism mean

What does the term polymorphism mean? Provide an example.

  8-bit or 16-bit mode, and the prescaling ratio

8-bit or 16-bit mode, and the prescaling ratio. You can assume XTAL = 10M Hz or at the frequency you specify.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd