Created
March 26, 2015 13:44
-
-
Save Sergaav/bb920e3ca6cb4da4cc95 to your computer and use it in GitHub Desktop.
Triangle and point (x,y)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gmail.sergaav.dz3_3; | |
import java.util.Scanner; | |
public class dz3_3 { | |
public static void main(String[] args) { | |
double x; | |
double y; | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Input x:"); | |
x = sc.nextDouble(); | |
System.out.println("Input y:"); | |
y = sc.nextDouble(); | |
System.out | |
.println(((x > 0 && y < 1) || (y > 0 && x < 4) || (x > 4 && y > 1)) ? "NO" | |
: "YES"); | |
sc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment