/* From: "COMPUTATIONAL PHYSICS, 2nd Ed" by RH Landau, MJ Paez, and CC Bordeianu Copyright Wiley-VCH, 2007. Electronic Materials copyright: R Landau, Oregon State Univ, 2007; MJ Paez, Univ Antioquia, 2007; & CC Bordeianu, Univ Bucharest, 2007 Support by National Science Foundation */ // area.c: Area of a circle, sample I/O #include #define PI 3.1415926535897932385E0 main() { double radius, area; // declare variables printf("Enter the radius of a circle \n"); // ask for radius scanf("%lf", &radius); // read in radius area = radius * radius * PI; // area formula printf("radius=%f, area=%f\n", radius, area); // print results }