Question: Please help me correct my error, thanks. 8 1 import java.util.Scanner; 2 public class Main 3- { 4 public static void main(String[] args) 5. {
Please help me correct my error, thanks.

![public class Main 3- { 4 public static void main(String[] args) 5.](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f32c36308ff_59766f32c35d16ee.jpg)
8 1 import java.util.Scanner; 2 public class Main 3- { 4 public static void main(String[] args) 5. { 6 7 Scanner keyboard= new Scanner(System.in); System.out.println("Enter the resting Heart Rate: "); 9 int hr= keyboard.nextInt(); 10 System.out.println("Enter age: "); 11 int age= keyboard.nextInt(); 12 System.out.println("Enter gender (M/F): "); 13 char c= keyboard.next().charAt(); 14 int hrmax= 220-age; 15 int vo2Max=(15.0*(hrmax/hrrest)); 16 17 if((age70)&&(c=='m' || c=='M')) 18 System.out.println("Invalid age!"); 19 else if((age60)&&(c=='f' || c=='F')) 20 System.out.println("Invalid age!"); else if(c=='m' || c=='M') 22 { 23. if(age >= 18 && age=40 && vo2Max=18 && age= 62 && vo2Max= 18 && age= 55 && vo2Max=18 && age=52 && vo2Max= 10 && age=50 && vo2Max
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
