Answer to Question 07B-1

  // This program reads a number x from the standard input
  // and writes the square root of x.

  #include <cstdio>
  #include <cmath>
  using namespace std;

  int main()
  {
    double x;

    printf("Square root of what number? ");
    scanf("%lf", &x);
    printf("The square root of %lf is %lf\n", x, sqrt(x));
    return 0;
  }