Created
May 7, 2020 14:39
-
-
Save kryvoboker/316cad37bcfa7fb00a236aee1d6634e1 to your computer and use it in GitHub Desktop.
HomeWork3
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
import java.util.Scanner; | |
/** | |
* | |
* @author kamaz | |
*/ | |
public class Main { | |
public static void main(String [] args) { | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Enter x"); | |
int x = sc.nextInt(); | |
System.out.println("Enter y"); | |
int y = sc.nextInt(); | |
int r = (int) Math.sqrt((x*x)+(y*y)); | |
if (r <= 4) { | |
System.out.println("Ok"); | |
} | |
else { | |
System.out.println("Poorly"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment