Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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) );
Comment

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
Comment

PREVIOUS NEXT
Code Example
Javascript :: angular conditional tooltip 
Javascript :: render and mount functional component 
Javascript :: how to add data modal target attribute in jquery 
Javascript :: Hint:“javascript sleep 1 second” is a pretty common code problem that people search ;-) 
Javascript :: insertbefore javascript 
Javascript :: even numbers in an array 
Javascript :: javascript sucks 
Javascript :: dual array javascript 
Javascript :: linkedin api v2 get email address 
Javascript :: javascript side effects 
Javascript :: convert json to arraylist java 
Javascript :: js Changing selected option by option text 
Javascript :: join string js with and at the last item 
Javascript :: macam macam looping javascript 
Javascript :: public static void main(dsjjsdds, jdnjd, jsndjsd, isjdjsd, sjdijs, skjdks_+) __ osakd___ +++ 
Javascript :: comment dire le nombre de ligne html en cliquamt sur un boutton javascript 
Javascript :: bigint type js 
Python :: check if tensorflow gpu is installed 
Python :: conda install ffmpeg 
Python :: remove all pyc 
Python :: Import "reportlab" could not be resolved django 
Python :: extract year from datetime pandas 
Python :: selenium python maximize window 
Python :: dataframe column to string 
Python :: httpie on windows 
Python :: how to talk to girls 
Python :: import apiview 
Python :: use incognito in selenium webdriver 
Python :: django return httpresponse 
Python :: convert into date python 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =