import java.util.Scanner;
public class VerificacionDonarSangre {
public static void main(String[] args) {
Scanner teclado = new Scanner(System.in);
System.out.println("Ingrese la edad del donante: ");
int edadDonante = teclado.nextInt();
System.out.println("Ingrese el peso del donante (en kg): ");
double pesoDonante = teclado.nextDouble();
boolean esCompatible = true;
if (edadDonante < 18 || edadDonante > 65) {
System.out.println("Debe tener entre 18 y 65 años.");
esCompatible = false;
}
if (pesoDonante <= 50) {
System.out.println("Debe tener un peso mayor a 50 Kg.");
esCompatible = false;
}
if (esCompatible) {
System.out.println("Es compatible para donar sangre");
} else {
System.out.println("No es compatible para donar sangre");
}
}
}