function circum()
{
   var cir = 0  // the circumference, or what we're solving for
   var dia = 0  // the diameter of the circle in question
   var pi  = 3.1416	   // pi
   while (dia == 0)
      {
         dia = prompt("Enter the DIAMETER of the circle in inches - ", 0);
      }
   cir = dia * pi
   cir = cir + " "
   if (cir != 0)
   {
      alert("The CIRCUMFERENCE of the circle is " + cir.substring(0,6) + " inches");
   }
}


function dia()
{
   var dia = 0  // the diameter, what we're solving for
   var cir = 0  // the measured circumference of a circle
   var pi  = 3.1416
   while (cir == 0)
   {
      cir = prompt("Enter the CIRCUMFERENCE of the circle in inches - ", 0);
   }
   dia = cir / pi
   dia = dia + " "
   if (dia != 0)
   {
      alert("The DIAMETER of the circle is " + dia.substring(0,5) + " inches");
   }
}


function radius()
{
   var rad = 0  // the radius, what we're solving for
   var dia = 0  // the measured, or computed, diameter

   while (dia == 0)
   {
      dia = prompt("Enter the DIAMETER of the circle in inches - ", 0);
   }
   rad = dia / 2
   rad = rad + " "
   if (rad != 0)
   {
      alert("The RADIUS of the circle is " + rad.substring(0,5) + " inches");
   }
}


function area()
{
   var area = 0 // the area, what we're solving for
   var rad = 0  // the measured, or computed, radius
   var pi  = 3.1416

   while (rad == 0)
   {
      rad = prompt("Enter the RADIUS of the circle in inches - ", 0);
   }
   area = (rad * rad) * pi
   area = area + " "
   if (area != 0)
   {
      alert("The AREA of the circle is " + area.substring(0,7) + " square inches");
   }
}


function CylVol()
{
     var pi4 = .7853982     // value of pi over 4
    var bore = 0            // bore of cylinder
    var str = 0             // stroke of cylinder
    var cVol = 0            // cylinder volume, what we're
                            //  solving for
    while (bore == 0)
    {
        bore = prompt("Enter the BORE of the cylinder in inches - ", 0);
    }
    while (str == 0)
    {
        str = prompt("Enter the STROKE of the cylinder in inches - ",0);
    }
    cVol = pi4 * (bore * bore) * str
    cVol = cVol + " "
    if (cVol != 0)
    {
        alert("The CYLINDER VOLUME is " + cVol.substring(0,6) + " cubic inches");
    }
}


function inch_cc()
{
    cc = 0  // cubic centimeters, what we're solving for
    ci   = 0  // the known volume in cubic centimeters

    while (ci == 0)
    {
        ci = prompt("Enter the CUBIC INCHES known - ", 0);
    }
    cc =ci * 16.387
    cc = cc + " "
    if (cc != 0)
    {
        alert("The CUBIC CENTIMETERS are " + cc.substring(0,6) + " cubic centimeters");
    }
}


function cc_inch()
{
    ci = 0  // the radius, what we're solving for
    cc   = 0  // the known volume in cubic centimeters

    while (cc == 0)
    {
        cc = prompt("Enter the CUBIC CENTIMETERS known - ", 0);
    }
    ci = cc * 0.06102
    ci = ci + " "
    if (ci != 0)
    {
        alert("The CUBIC INCHES are " + ci.substring(0,6) + " cubic inches");
    }
}


function timing()
{
    t1 = 0		 // temporary variable
    t2 = 0  	 	 // the time, what we're solving for
    rpm = 0  	 // the rpm we're solving for

    while (rpm == 0)
    {
        rpm = prompt("Enter the RPM - ", 0);
    }
    t1 = 60/rpm
    t2 = t1/360
    t2 = t2 + " "
    if (t2 != 0)
    {
        alert("The TIME PER DEGREE OF CRANSHAFT REVOLTION is " + t2.substring(0,8) + " seconds");
    }
}



