Advertisement
Egor_Vakar

lab1.1 java

Sep 24th, 2022
1,041
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner scanner = new Scanner(System.in);
  7.         System.out.println("Введите R: ");
  8.         int r = scaner.nextInt();
  9.         System.out.println("Введите X: ");
  10.         int x = scanner.nextInt();
  11.         System.out.println("Введите Y: ");
  12.         int y = scanner.nextInt();
  13.         if (r * r == x * x + y * y)
  14.             System.out.println("Точка лежит на окружности");
  15.         else
  16.             System.out.println("Точка не лежит на окружности");
  17.         scanner.close();
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement