Project #48591 - c++ program

1-FLUID MECHANICS: Fluid following in a pipe flows in a smooth pattern, knows as laminar flow, or a turbulent pattern, know as turbulent flow. The velocity, V, that produces each type of flow in the pipe can be determined by using these formulas: Vlaminar = (2100Âµ)/(pd) Vturbulent =(4000Âµ)/(pd) Vlaminar is the velocity of the fluid, in ft/sec, that produces a definite laminar flow. Vturbulent is the velocity of the fluid, in ft/sec, that produces a definite turbulent flow. Âµ is the fluid's viscosity in lbf-sec/ft2. P is the fluid's density in slug/ft3. d is the pipe's inside diameter in feet. Using these formulas, write and test a C++ function named flow () that returns both the laminar flow velocity, Vlaminar, and turbulent flow velocity, Vturbulent, using reference parameters. The function should calculate these velocities for water, which has a viscosity, Âµ, of 1.9 Ã— 105 lbf-sec/ft2 and a density, P, of 1.94 slug/ft3. The pipe diameter should be passed by value to the flow () function. 2-Mathematical functions: Write a program for each of the equations below and display a table of x value and its corresponding y value. Use arrays, so if needed y values can be retrieved for further investigation. y=3x5 â€“ 2x3 + x for x between 5 and 10 in increments of 0.2 y=1+x+x^2/2+x^3/3+x^4/24 for x between 1 and 3 increments of 0.1 y=2e0.8t for t between 4 and 10 increments of 0.2 3-Mathematical functions: Write a program that calculates and displays values for y when y=xz/(x-z) your program should calculate y for values for x ranging between 1 and 5 and values of z ranging between 2 and 6. The x variable should control the outer loop and be incremented in steps of 1, and z should be incremented in steps of 1. Your program should also display the message FUNCTION UNDEFINED when the x and z values are equal. 4-(coin tossing) Write a program that simulates coin tossing. For each toss of the coin the number of times each side of the coin appears. Print the results. The program should call a separate function flip that takes no arguments and returns 0 for tails and 1 for heads. [ note: if the program realistically simulates the coin tossing, then each side of the coin should appear approximately half the time for a total of approximately 50 heads and 50 tails.]

 Subject Computer Due By (Pacific Time) 11/24/2014 12:00 pm
TutorRating
pallavi

Chat Now!

out of 1971 reviews
amosmm

Chat Now!

out of 766 reviews
PhyzKyd

Chat Now!

out of 1164 reviews
rajdeep77

Chat Now!

out of 721 reviews
sctys

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews
topnotcher

Chat Now!

out of 766 reviews
XXXIAO

Chat Now!

out of 680 reviews