# Functions in C

see attached...rewrite the program shown using functions per the direction....please use C and keep it simple.

please make sure the program will run on C

© BrainMass Inc. brainmass.com October 25, 2018, 6:21 am ad1c9bdddfhttps://brainmass.com/computer-science/c/functions-in-c-456602

#### Solution Summary

Screenshot of the working program to the stated problem is attached.

Different Problems

Week 4/2

Write three quadratic equations, with a, b, and c (coefficients of x2, x, and the constant) as:

1. Integers

2. Rational numbers

3. Irrational numbers

Week 4/ 3

1. How many solutions exist for a quadratic equation? How do we determine algebraically whether the solutions are real or complex?

2. What three techniques can be used to solve a quadratic equation? Demonstrate these techniques on the equation "x2 - 10x - 39 = 0".

3.

Look at the graph above and comment on the sign of D or the discriminant. Form the quadratic equation based on the information provided and find its solution.

4. Translate the following into a quadratic equation, and solve it: The length of a rectangular garden is four times its width; if the area of the garden is 196 square meters, what are its dimensions?

Week 5/1

1. Do exponential functions only model phenomena that grow, or can they also model phenomena that decay? Explain what is different in the form of the function in each case.

2. True or false: The function "f(x) = 4x" grows four times faster than the function "g(x) = x". Explain.

3. What are the asymptotes of the functions "f(x) = 4x" and "g(x) = log5x"?

4. A cell divides into two identical copies every 4 minutes. How many cells will exist after 5 hours?

5. The level of thorium in a sample decreases by a factor of one-half every 2 million years. A meteorite is discovered to have only 8.6% of its original thorium remaining. How old is the meteorite?

Week 5/3

Refer to the graph given below and identify the graph that represents the corresponding function. Justify your answer.

y = 4x

y = log4x

Plot the graphs of the following functions. Scan the graphs and post them to the Facilitator along with your response.

1. f(x) = 5x

2. f(x) = 4x+2

3. f(x) = (1/3)x

4. f(x) = log5x

Week 6/1

1. Give an example of an exponential function. Convert this exponential function to a logarithmic function. Plot the graph of both the functions and post to the discussion forum. Discuss these functions and their graphs with your classmates.

2. Form each of the following:

? A linear equation in one variable

? A linear equation in two variables

? A quadratic equation

? A polynomial of three terms

? An exponential function

? A logarithmic function

3. Plot the graph of the above equations formed in question 2, and post your response to the discussion forum.

4. Derive the quadratic and linear equations from the corresponding graphs of a classmate.

Week 6/2

Answer the following question:

For the exponential function ex and logarithmic function log x, graphically show the effect if x is halved. Include a table of values for all four functions.

Week 6/3

Evaluate the functions for the values of x given as 1, 2, 4, 8, and 16. Rank in order from fastest to slowest the rate at which each function changes with increasing values of x.

1. f(x) = 2x - 5

2. f(x) = x2 - 4x + 3

3. f(x) = x3 + 4x2 - 2x - 3

4. f(x) = 7x

5. f(x) = log x