desislava_topuzakova

02. Radians to Degrees

May 9th, 2021
458
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace _02.RadiansToDegrees
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //1. променлива за радиани - ok
  10.             //2. променлива за градуси = радиани * 180 / π - ok
  11.             //3. отпечатваме градуси - Math.Round() - ok
  12.  
  13.             double radians = double.Parse(Console.ReadLine());
  14.             double degrees = radians * 180 / Math.PI;
  15.             Console.WriteLine(Math.Round(degrees));
  16.  
  17.  
  18.         }
  19.     }
  20. }
RAW Paste Data