# MATHEMATICS - JavaScript Codes

## Factoriser

* Description This code factorises the given number and also displays whether it is prime or not. Source Code
<HEAD>
<style type="text/css">
<!--
i ...*

*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
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
fu ...*

*Sep 21, 2008*

## Degree and Radian

* Description This code converts Degrees to Radians and vice versa. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function ra_de() {
var p ...*

*Sep 21, 2008*

## Bubble Sort

* Description This code sorts the given array of numbers in Ascending order using Bubble Sort. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
fun ...*

*Sep 21, 2008*

## Horsepower

* Description This code calculates the Horsepower of any machine. Source Code
<BODY>
<center>
<form name="Calc">
<SCRIPT LANGUAGE="JavaScript&qu ...*

*Sep 21, 2008*

## Area Calculater

* Description This code calculates the area of specified figures. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function doArea(num) {
switch( ...*

*Sep 17, 2008*

## Velocity

* Description This code changes the velocity from one unit of measurement to the other. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
fun ...*

*Sep 21, 2008*

## GCF

* Description This code calculates the GCF of two or three given numbers. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function go(){
var tex ...*

*Sep 21, 2008*

## Line Equation

* Description This code calculates the Equation of Line from its given coordinates. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function calcu ...*

*Sep 21, 2008*

## Fibonnaci

* Description This code calculates the Fibonnaci sequence of given limit of numbers. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function f(n) ...*

*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
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
...*

*Sep 21, 2008*

## GCD and LCM

* Description This code calculates the GCD and LCM of any two or three given numbers. Source Code
<HEAD>
<script type="text/javascript">
<!-- Begin
function go ...*

*Sep 21, 2008*

## Common Factor

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

*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
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
...*

*Sep 18, 2008*

## Compound Interest

* Description This code calculates the Compound Interest and the Amount using the given information. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Be ...*

*Sep 21, 2008*

## Day of Week

* Description This code provides the day of the week from the date provided. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var months = new Arra ...*

*Sep 21, 2008*

## Fractions

* Description This code evaluates or reduces two given fractions. Source Code
<HEAD>
<script type="text/javascript">
var n1, n2, d1, d2, An, Ad, Op;
var neg=1;
...*

*Sep 21, 2008*

## Airport Calculater

* Description This code calculates the distance between the two airports. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var Orig=new Array();
...*

*Sep 17, 2008*

## Latitude and Longitude

* Description This code shows the direction with respect to latitude or longitude. Source Code
<HEAD>
<script type="text/javascript">
function calc(Location) {
...*

*Sep 21, 2008*

## Distance-Speed-Time

* Description This code calculates the third value from the given two values. Source Code
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function calculateti ...*

*Sep 21, 2008*