Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package L01_Exercises;
- import java.util.Scanner;
- public class P02_RadiansToDegrees {
- public static void main(String[] args) {
- //1. Четем от конзолата
- //2. Преобразуваме от радиани в градуси -> градус = радиан * 180 / π
- //3. Принтираме на конзолата
- Scanner scanner = new Scanner(System.in);
- double radians = Double.parseDouble(scanner.nextLine());
- double degrees = radians * 180 / Math.PI;
- System.out.println(degrees);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement