Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Globalization;
- namespace TestPrograms
- {
- class TestPrograms
- {
- static void Main()
- {
- int x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- string[] r = Math.Sqrt((x * x) + (y * y)).ToString("0.0000000").Split('.');
- double angle = Math.Atan2(y, x);
- double radians = angle * (180 / Math.PI);
- Console.WriteLine(r[0] + "." + r[1].Substring(0, 4));
- Console.WriteLine("{0:0.0000}", radians);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement