Make a function that calculates the CUBE-ROOT of the input number and returns the value (single or multiple). Cube root of 125 = 5.000000 Roots can be both real or complex #include You can not use...




How to do it by c?



Code with comments and output screenshot is must for an Upvote. No plagarism please!


Make a function that calculates the CUBE-ROOT of the input<br>number and returns the value (single or multiple).<br>Cube root of 125 = 5.000000<br>Roots can be both real or complex<br>#include <stdio.h><br>You can not use math.h<br>double cubeRoot(double n) {<br>double i, precision = 0.000001;<br>You can not use loops (for do while)<br>for(i = 1; (i*i*i) <= n; ++i);<br>//Integer part<br>for(--i; (i*i*i) < n; i += precision); //Fractional part<br>You can modify this code:<br>return i;<br>}<br>int main() {<br>Hint:<br>int n = 125;<br>N<br>1<br>2x, +<br>Xn+1<br>printf(

Extracted text: Make a function that calculates the CUBE-ROOT of the input number and returns the value (single or multiple). Cube root of 125 = 5.000000 Roots can be both real or complex #include You can not use math.h double cubeRoot(double n) { double i, precision = 0.000001; You can not use loops (for do while) for(i = 1; (i*i*i) <= n;="" ++i);="" integer="" part="" for(--i;="" (i*i*i)="">< n;="" i="" +="precision);" fractional="" part="" you="" can="" modify="" this="" code:="" return="" i;="" }="" int="" main()="" {="" hint:="" int="" n="125;" n="" 1="" 2x,="" +="" xn+1="" printf("cube="" root="" of="" %d="%lf"," n,="" cuberoot(n));="" return="">

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here