New course! Every coder should learn Generative AI!
Try a free lesson+ 2
In Java, default angle unit is radians. So you have to use
System.out.print(Math.sin(3.1416/3) + " " + Math.cos(3.1416/4));
Or something similar
+ 2
System.out.println(String.format("%s %s", Math.sin(Math.PI/3), Math.sin (Math.PI/4)));