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!
© 2024 OneMinuteCode. All rights reserved.