/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Larry Wiley :: http://schools.nsd.org/%7Elwiley/ */

function alertwiththr() {
  var rhr = prompt("What is your resting heart rate?", "")
  var age  = prompt("What is your age?", "")
  var tot = 220 - +rhr+ - age
  var lowfinal = tot *.7 +  +rhr
  var hifinal = tot *.9 + +rhr
  alert("Your target heart rate is between" +" "+lowfinal+" "+ "and"+" " +hifinal)
}

