Write a for loop to fill the array with numbers from user

Assignment Help C/C++ Programming
Reference no: EM131842777

Assignment

There are two parts.

1. Write code for a function that receives two parameters (a,and b) by value and has two more parameters (c and d) by reference. All parameters are double.

The function works by assigning c to (a/b) and assigning d to (a*b).

From main, use scanf to get two numbers, then call the function, and then display both returned values to the output in a printf statement.

2. After part 1 is completed, write code to get 20 integer numbers from the user. The code then displays how many of those numbers are above the numbers average. To get proper credit you must follow these steps:

a. Write a for loop to fill the array with numbers from the user. Use a pointer

b. Use an index to pass through all array elements to calculate the average in another loop.

c. Write a function, then pass the array, its size, and the average to the function. The function returns the count of the number of elements that are above the average.

Reference no: EM131842777

Questions Cloud

Describe the epistemological relativism : 1. Describe the epistemological relativism from Plato's day and our day (postmodernism).
Russow understanding of the problems of ambiguity : Explain Russow's understanding of the problems of Ambiguity, Objectives, and Override with regard to species and use 2
Financial manager make using net present value method : Using a 12% cost of capital, which decision should the financial manager make using the net present value method?
Create a model to transition an organization : Create a model to transition an organization through the following four (4) phases of learning: individual, group, intergroup, and finally, ongoing learning.
Write a for loop to fill the array with numbers from user : Write a for loop to fill the array with numbers from the user. Use an index to pass through all array elements to calculate the average in another loop.
What are the benefits and potential problems associated : What are the benefits and potential problems associated with conflict? What are examples of strategies that can be applied for resolving conflict?
Duties and rights of individuals versus the state : Which principle of ethics underlies the first lines of Marx's Manifesto? What are the duties and rights of individuals versus the state?
What are the components of discretionary benefits : What are the components of discretionary benefits? Provide two examples for each component of discretionary benefits and identify an organization.
Estimate? amazon market capitalization : Estimate? Amazon's market capitalization. If Amazon has million shares? outstanding, what stock price does this correspond? to?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a function to compute the magnitude f

write a function to compute the magnitude F and direction angle of a two-dimensional force F by using two components of the force fx,fy as its parameters,returning F and using the reference to pass theta value .

  Complete the function drawtriangle

Complete the function drawTriangle in the above program as well as printADU function - Complete the draw program

  Implement counting loops using the for loop

C++ provides three statements for implementing loops: while, for, and do-while. Use the for to implement counting loops and the do-while to implement loops.

  Develop a program that calculates monthly payments for loan

Home Loan Amortization Develop and test a program that calculates the monthly payments for a loan amount and a term (number of years) input by the user.

  Reverses all the element of an array

Write a function that reverses all the element of an array.that is,the first element is exchanged with the last element; the second element is exchange with the second to the last element,and so on

  How many members does class bagtype have

CIS242 Assignment- How many members does class bagType have? How many private members does class bagType have? How many constructors does class bagType have? How many constant functions does class bagType have?

  Each clone will communicate to the parent process

Write a program that will create 3 clones. Each clone will communicate to the parent process over a pipe (There are 3 pipes) Each process will write Process n.

  Roles of human resource professionals

"I would like to discuss how IS has positively impacted the roles of human resource professionals.  Specifically, I would like to look at data storing and how having this information stored in an HRIS system helps human resource professionals beco..

  Define the kind of exception

When opening a binary file for output in the ways discussed in this chapter, might an exception be thrown? What kind of exception?

  Write another main function create three bank accounts

Write another main function - in this function create three bank accounts, then prompt the user to enter a bank account number, if the account number matches one on the three accounts then display the following menu otherwise allow the user to ent..

  Write test program to call function several times for gcd

Greatest common divisor of two integers is largest integer which will evenly divide both integers. Implement this function in assembly language and write test program which calls function several times, passing it different values.

  Write a program that will read from a file a series of lines

Write a program that will read from a file a series of lines that contain an individuals first and last name followed by a colon, then three integers.

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