IvetValcheva

Radians to Degrees

Jan 10th, 2022
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Radians_to_Degrees
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //четем радиани
  10.             double radians = double.Parse(Console.ReadLine());
  11.  
  12.             //преобразуваме радиани => градуси
  13.             //фармула: градус = радиан * 180 / π  => (π = Math.PI)
  14.             double degrees = radians * 180 / Math.PI;
  15.  
  16.             //отпечатваме резултата (градусите)
  17.             Console.WriteLine(degrees);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment