Skip to content

Instantly share code, notes, and snippets.

@kryvoboker
Created May 7, 2020 14:39
Show Gist options
  • Save kryvoboker/316cad37bcfa7fb00a236aee1d6634e1 to your computer and use it in GitHub Desktop.
Save kryvoboker/316cad37bcfa7fb00a236aee1d6634e1 to your computer and use it in GitHub Desktop.
HomeWork3
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