public class FormatDemo { 
  public static void main(String[] args) { 
    // Wyświetlanie nagłówka tabeli
    System.out.printf("%-10s%-10s%-10s%-10s%-10s\n", "Stopnie", 
      "Radiany", "Sinus", "Cosinus", "Tangens");

    // Wyświetlanie wartości dla 30 stopni
    int degrees = 30;
    double radians = Math.toRadians(degrees);
    System.out.printf("%-10d%-10.4f%-10.4f%-10.4f%-10.4f\n", degrees, 
      radians, Math.sin(radians), Math.cos(radians),
      Math.tan(radians));

    // Wyświetlanie wartości dla 60 stopni
    degrees = 60;
    radians = Math.toRadians(degrees);
    System.out.printf("%-10d%-10.4f%-10.4f%-10.4f%-10.4f\n", degrees, 
      radians, Math.sin(radians), Math.cos(radians), 
      Math.tan(radians));
  }
}
