1 public class Solution 2 { 3 public static void main(String[] args) 4 { 5 System.out.printf("%s\t%s\t%s\n", "ANGLE", "SIN", "COS"); 6 7 for(int i = 0; i <= 360; i += 10) 8 System.out.printf("%d\t%.4f\t%.4f\n", i, Math.sin(i * Math.PI / 180), Math.cos(i * Math.PI / 180)); 9 } 10 }
时间: 2024-10-29 19:08:32