Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class RadianToDegrees {
  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. double radians = Double.parseDouble(scanner.nextLine());
  10. double degrees = radians * 180 / Math.PI;
  11. System.out. printf("%.0f", degrees);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement