Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class RadiansToDegrees {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- //Convert radians in degrees
- //1. read degrees
- //2. formula: degrees = radians * 180 / Math.PI
- double radians = Double.parseDouble(scanner.nextLine());
- double degrees = radians * 180 / Math.PI;
- System.out.printf("%.0f", degrees);
- }
- }
Add Comment
Please, Sign In to add comment