desislava_topuzakova

02. Radians to Degrees

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