Sololearn: Learn to Code
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
21st Dec 2017, 4:27 PM
DAB
DAB - avatar
+ 2
System.out.println(String.format("%s %s", Math.sin(Math.PI/3), Math.sin (Math.PI/4)));
21st Dec 2017, 4:37 PM
ifl
ifl - avatar