It's a beginner's question for Java

Asked 2 years ago, Updated 2 years ago, 33 views

Thank you

code jsp web

2022-09-21 17:32

1 Answers

You didn't tell me exactly where you got stuck.

 if(tempSsn[6]%2==0&&yYear%2==0&&age>=40) //age->year
   {    
        System.out.println ("\nWant to be examined for stomach, liver, breast, and uterine cancers";
   }
   else if(tempSsn[6] % 2 == 1 && yYear % 2==0 && age >= 40) //if -> else if
   {
        System.out.println ("\nGastric cancer, liver cancer check-up")
   }
   else if(tempSsn[6] % 2 == 0  && yYear % 2==0 && age >= 50) 
   {
        System.out.println ("\nWish you get stomach, liver, colon, breast, and uterine cancer";
   }
   else if(tempSsn[6] % 2 == 1  && yYear % 2==0 && age >= 50) 
   {
        System.out.println ("\nHope you get stomach cancer, liver cancer, colon cancer");
   }
   else 
   {
        System.out.println ("Not Target"); //System.err -> System.out
   }

Fix it like this and try it out!


2022-09-21 17:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.