IvetValcheva

02. Radians to Degrees

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