public class SurfaceCercleEnConsole {

/* Calcul de la surface d'un cercle            */
/* Le rayon r est donne                        */

  static double surfaceCercle(double r) {
    double s;
    s = Math.PI*r*r;
    return s;
  }

/* Programme principal                         */

  public static void main(String [] args) {
    Console.setTitle("SurfaceCercle");
    double rayon;
    double surface;
    Console.afficher("SVP, rayon : ");
    rayon = Console.saisirDouble();
    surface = surfaceCercle(rayon);
    Console.afficherln("Surface = ",surface);
  }
}