Advertisement
myrdok123

Radians to Degrees

Oct 2nd, 2022
846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. package FirstStepsInCoding.Exercise;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class RadiansToDegrees {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.  
  10.         Scanner scanner = new Scanner(System.in);
  11.         //четем от конзолата
  12.         double radians = Double.parseDouble(scanner.nextLine());
  13.  
  14.         //преобразуваме радианите в градуси
  15.         double degrees = radians * 180/ Math.PI;
  16.  
  17.         //принтираме на конзолата
  18.         System.out.println(degrees);
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement