The angle between vectors

Report a typo

Whoa! This problem is much more complex than the usual one and requires knowledge of math. If you're feeling up to the challenge, brace yourself, and good luck! Otherwise, you can skip it for now and return any time later.

There are two 2D vectors. Find the angle between them. Its value has to be in degrees.

If you don't know how to find the angle, please refer to the Wikihow instruction.

Input data format

The first line contains two values of the first vector, the second line contains two values of the second vector. Values in one line are separated by a space.

Output data format

One fractional value: an angle between two vectors. You may not round it, it's up to you.

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 Kotlin
import kotlin.math.*

fun main() {
// put your code here
}
___

Create a free account to access the full topic