Horje
quadratic equation in js by function Code Example
quadratic equation in js by function
function solve(a,b,c){
    var result = (((-1*b) + Math.sqrt(Math.pow(b,2)) - (4*a*c))/(2*a));
    var result2 = (((-1*b) - Math.sqrt(Math.pow(b,2)) - (4*a*c))/(2*a));
    
    return result + "<br>" + result2;
}

document.write( solve(1,1,-1) );
quadratic equation in js by function
function solve(a,b,c){
    var result = (((-1*b) + Math.sqrt(Math.pow(b,2)) - (4*a*c))/(2*a));
    var result2 = (((-1*b) - Math.sqrt(Math.pow(b,2)) - (4*a*c))/(2*a));
    
    return result + "<br>" + result2;
}

document.write( solve(1,1,-1) );
 Run code snippet




Javascript

Related
phoenix routes Code Example phoenix routes Code Example
browser support fetch api Code Example browser support fetch api Code Example
can you get reinfected with the coronavirus Code Example can you get reinfected with the coronavirus Code Example
All numbers from 1 to 10 Code Example All numbers from 1 to 10 Code Example
javascript perimeter Code Example javascript perimeter Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12