import java.util.Scanner;
class Test
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.print("Enetr Boolean Value= ");
boolean talking=sc.nextBoolean();
System.out.print("Enter Hour value = ");
int hour=sc.nextInt();
if(talking && hour<7 || talking && hour>20)
{
System.out.println("true");
}
else
{
System.out.println("false");
}
}
}
class Test
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.print("Enetr Boolean Value= ");
boolean talking=sc.nextBoolean();
System.out.print("Enter Hour value = ");
int hour=sc.nextInt();
if(talking && hour<7 || talking && hour>20)
{
System.out.println("true");
}
else
{
System.out.println("false");
}
}
}
No comments:
Post a Comment