function getArea(r) {
   return (Math.pow(r,2) * Math.PI);
}

function getVol(r,h) {
   var a = getArea(r);
   return (a * h);
}

function getGal(v) {
   return cf * 7.48;
}

var diam, leng, cf;

diam = prompt("Enter the diameter of the cylinder in inches","");
leng = prompt("Enter the height of the cylinder in inches","");

cf = getVol(((diam / 12) / 2),(leng / 12));
document.write(cf+" cubic ft. or "+getGal(cf)+" gallons");

