+ 4
Help I can't run it what is wrong?
3 Réponses
+ 3
calculate max heart rate as:
220 - age
TargetHeartRate() returns one value
so you can calculate middle value between
50% and 80% and use it as value of variable range
or calculate 50% and 80% of max heart rate separately
and print two numbers as target range of bpm
if you need double result use decimal dot in one number
(50/100.0)
you need main method eg
public static void main(String[] args) {
var hr = new heartrate("John","Doe", 10,6,2000);
System.out.printf("%.2f bpm\n", hr.TargetHeartRate() );
}
+ 11
1.are you trying to do without main method:((
2.you didn't input any or print output statement for target heart beat rate
3 check the braces u didn't close.
+ 3
reformat your code like this and it will get alot easier to find errors
https://code.sololearn.com/cqsMEHQ2Zrzu/?ref=app