Sunday, June 2, 2013
Eleven Logical Operation
import java.util.Scanner;
class ElevenLogicalVariable {
public static void main(String[] args) {
Scanner santosh = new Scanner(System.in);
int girl;
int boy;
System.out.println("Please Put Age of Girl");
girl = santosh.nextInt();
System.out.println("Please Put Age of Boy");
boy = santosh.nextInt();
if (girl >= 18 && boy >= 21)
{
System.out.println("You Can Marry");
}
else
{
System.out.println("You can't Marry Please Wait for The Right time");
}
}
}
// out put
Please Put Age of Girl
18
Please Put Age of Boy
21
You Can Marry
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment