subject
Engineering, 11.06.2021 14:40 QueenNerdy889

In c the square root of a number N can be approximated by repeated calculation using the formula NG = 0.5(LG + N/LG) where NG stands for next guess and LG stands for last guess. Write a function that calculates the square root of a number using this method. The initial guess will be the starting value of LG. The program will com- pute a value for NG using the formula given. The difference between NG and LG is checked to see whether these two guesses are almost identical. If they are, NG is accepted as the square root; otherwise, the next guess (NG) becomes the last guess (LG) and the process is repeated (another value is computed for NG, the difference is checked, and so on). The loop should be repeated until the difference is less than 0. 005. Use an initial guess of 1. 0. Write a driver function and test your square root function for the numbers 4, 120. 5, 88, 36.01, 10,000, and 0. 25 PLEASE İN C PROGRAMMİNG

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
Consider a large isothermal enclosure that is maintained at a uniform temperature of 2000 k. calculate the emissive power of the radiation that emerges from a small aperture on the enclosure surface. what is the wavelength ? , below which 10% of the emission is concentrated? what is the wavelength ? 2 above which 10% of the emission is concentrated? determine the wavelength at which maximum spectral emissive power occurs. what is the irradiation incident on a small object placed inside the enclosure?
Answers: 2
question
Engineering, 04.07.2019 18:10
An ideal otto cycle with air as the working fluid has a compression ratio of 8. the minimum and maximum temperatures in the cycle are 300 k and 1340 k. use constant specific heats at room temperature to determine (a) the amount of heat transferred to the air during the heat- addition kj/kg, (b) the thermal efficiency, and (c) the thermal efficiency of a carnot cycle ope limits. process, in rating between the same temperature
Answers: 2
question
Engineering, 04.07.2019 18:20
An engine runs on the ideal diesel cycle. the cycle has a compression ratio of 20 and a cutoff ratio of 2. the highest temperature in the cycle is 1200 k. if the heat into the system is 300 kj/kg of working fluid and using variable specific heats determine the work produced per mass of working fluid
Answers: 3
You know the right answer?
In c the square root of a number N can be approximated by repeated calculation using the formula NG...
Questions
question
Mathematics, 29.01.2020 15:59
Questions on the website: 13722367