The angle between vectors

Report a typo

You are given two 2D vectors. Find the angle (in degrees) between them.

If you don't know how to find the angle, see here: http://www.wikihow.com/Find-the-Angle-Between-Two-Vectors.

Input data format

The first line contains two components of the first vector; the second line contains two components of the second vector. Components in one line are separated by space.

Output data format

One double value: an angle between two vectors. The result can have an error of less than 1e-8.

Sample Input 1:

1 3
4 2

Sample Output 1:

45

Sample Input 2:

0 4
0 4

Sample Output 2:

0
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic