Created
October 24, 2019 12:19
-
-
Save fakedrake/3c265db66fd0f41ec6d08ac973670e74 to your computer and use it in GitHub Desktop.
This file contains hidden or 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; | |
public class Homework { | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
System.out.print("Enter x coordinate: "); | |
int x_coordinate = scan.nextInt(); | |
System.out.print("Enter x coordinate: "); | |
int y_coordinate = scan.nextInt(); | |
scan.close(); | |
System.out.println("Vector length: " | |
+ sqrt(pow(x_coordinate,2) + pow(y_coordinate,2))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment