Exemple d’utilisation de Math.PI

Author:


{filelink=6023}

public class PrintfPI {
  public static void main(String[] args) {

    // PI 3.141593
    System.out.printf("le pi par d�faut %fn", Math.PI );
    // PI 3.14
    System.out.printf("le pi en 2 d�cimal %.2f", Math.PI );

  }

}

Leave a Reply

Your email address will not be published. Required fields are marked *