# MATHEMATICS - JavaScript Codes

## Factoriser

Description This code factorises the given number and also displays whether it is prime or not. Source Code &lt;HEAD&gt; &lt;style type=&quot;text/css&quot;&gt; &lt;!-- i ...

0 Comments. 1705 views since Sep 18, 2008

## Cosine Calculator

Description This code takes the Hypotenuse and the Adjacent angle as input and provides Cosine Angle as output. Source Code &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin fu ...

0 Comments. 1051 views since Sep 21, 2008

Description This code converts Degrees to Radians and vice versa. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin function ra_de() { var p ...

0 Comments. 1023 views since Sep 21, 2008

## Bubble Sort

Description This code sorts the given array of numbers in Ascending order using Bubble Sort. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin fun ...

0 Comments. 1021 views since Sep 21, 2008

## Horsepower

Description This code calculates the Horsepower of any machine. Source Code &lt;BODY&gt; &lt;center&gt; &lt;form name=&quot;Calc&quot;&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&qu ...

0 Comments. 993 views since Sep 21, 2008

## Area Calculater

Description This code calculates the area of specified figures. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin function doArea(num) { switch( ...

0 Comments. 988 views since Sep 17, 2008

## Velocity

Description This code changes the velocity from one unit of measurement to the other. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin fun ...

0 Comments. 985 views since Sep 21, 2008

## Line Equation

Description This code calculates the Equation of Line from its given coordinates. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin function calcu ...

1 Comments. 948 views since Sep 21, 2008

## GCF

Description This code calculates the GCF of two or three given numbers. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin function go(){ var tex ...

0 Comments. 946 views since Sep 21, 2008

## Fibonnaci

Description This code calculates the Fibonnaci sequence of given limit of numbers. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin function f(n) ...

0 Comments. 931 views since Sep 21, 2008

## Energy and Work

Description This code shows the relation between Energy and Work and calculates the other from the given one. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; ...

0 Comments. 927 views since Sep 21, 2008

## GCD and LCM

Description This code calculates the GCD and LCM of any two or three given numbers. Source Code &lt;HEAD&gt; &lt;script type=&quot;text/javascript&quot;&gt; &lt;!-- Begin function go ...

0 Comments. 915 views since Sep 21, 2008

## Common Factor

Description This code calculates the common factors of any two given numbers. Source Code &lt;HEAD&gt; &lt;script&gt; function findFactors() { var f = document.forms[0]; ...

0 Comments. 905 views since Sep 21, 2008

## Miles per Gallon

Description This code calculates the Miles per Gallon of fuel used by a vehicle and estimates its cost per litre. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; ...

0 Comments. 905 views since Sep 18, 2008

## Compound Interest

Description This code calculates the Compound Interest and the Amount using the given information. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Be ...

0 Comments. 904 views since Sep 21, 2008

## Day of Week

Description This code provides the day of the week from the date provided. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin var months = new Arra ...

0 Comments. 897 views since Sep 21, 2008

## Fractions

Description This code evaluates or reduces two given fractions. Source Code &lt;HEAD&gt; &lt;script type=&quot;text/javascript&quot;&gt; var n1, n2, d1, d2, An, Ad, Op; var neg=1; ...

0 Comments. 879 views since Sep 21, 2008

## Airport Calculater

Description This code calculates the distance between the two airports. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin var Orig=new Array(); ...

0 Comments. 863 views since Sep 17, 2008

## Latitude and Longitude

Description This code shows the direction with respect to latitude or longitude. Source Code &lt;HEAD&gt; &lt;script type=&quot;text/javascript&quot;&gt; function calc(Location) { ...

0 Comments. 856 views since Sep 21, 2008

## Distance-Speed-Time

Description This code calculates the third value from the given two values. Source Code &lt;HEAD&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt; &lt;!-- Begin function calculateti ...

0 Comments. 838 views since Sep 21, 2008