Computer Science, asked by ankitsimraj, 2 months ago

Write a program to compare the age of two people and print true if both are between 25-50 years of
age, else print false

Answers

Answered by danishdubey
1

import java.util.*;

class abc{

public static void main(String args[]){

Scanner sc=new Scanner(System.in);

System.out.print("Enter age > ");

int age1=sc.nextInt();

System.out.print("enter age > ");

int age2=sc.nextInt();

if(((age1<50)&&(age>25))&&((age<50)&&(age>25))){

System.out.print(true);

else{System.out.print(false);

}

}

Answered by kunalhero55
0

Explanation:

the new Orleans is right in hindi film and a lot more to the point where surajkund was a

Similar questions