Advertisement
SUni2020

RadiansToDegrees_02

Feb 16th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class RadiansToDegrees_02 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         //1. read input -> radians
  7.         //2. calculate degrees = radians * 180 / pi
  8.         //3. print -> 0
  9.  
  10.         double radians= Double.parseDouble(scanner.nextLine());
  11.         double degrees = radians * 180 / Math.PI;
  12.         System.out.printf("%.0f",degrees);
  13.  
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement