Ferix

RSOJava#3

Nov 25th, 2020 (edited)
299
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. import java.lang.Math;
  3.  
  4. public class MyClass {
  5.     public static void main(String args[]) {
  6.        
  7.         Scanner input = new Scanner(System.in);
  8.        
  9.         double inputX1 = input.nextDouble();
  10.         double inputY1 = input.nextDouble();
  11.         double inputX2 = input.nextDouble();
  12.         double inputY2 = input.nextDouble();
  13.        
  14.         double distance = Math.sqrt(Math.pow((inputX2 - inputX1),2)+(Math.pow((inputY2-inputY1),2)));
  15.        
  16.         System.out.println(distance);
  17.    
  18.     }
  19. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×