<!-- hamlet
<!-- copytar
examples/                                                                                           0040755 0002611 0000666 00000000000 06355551135 0013536 5                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        examples/sroot.c                                                                                    0100644 0002611 0000666 00000000465 06355551133 0015050 0                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        /* level 2 */
/* Illustrates the use of the standard function "sqrt".

   Created:  Joe Zachary, October 20, 1992
   Modified:
*/


#include <stdio.h>
#include <math.h>


void main () {
  float x;
  printf("Please enter a float: ");
  scanf("%f", &x);
  printf("The square root of %f is %f\n", x, sqrt(x));
}
                                                                                                                                                                                                           examples/user1.c                                                                                    0100644 0002611 0000666 00000001126 06355551134 0014735 0                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        /* level 2 */
/* Another illustration of the use of standard functions

   Created:  Joe Zachary, October 20, 1992
   Modified:
*/


#include <stdio.h>
#include <math.h>


void main () {

  float x;

  printf("Please enter a float: ");
  scanf("%f", &x);
  printf("The base two logarithm of %f is %f\n", x, log10(x)/log10(2));

  printf("Please enter a real number: ");
  scanf("%f", &x);
  printf("The base two logarithm of %f is %f\n", x, log10(x)/log10(2));

  printf("Please enter a real number: ");
  scanf("%f", &x);
  printf("The base two logarithm of %f is %f\n", x, log10(x)/log10(2));

}
                                                                                                                                                                                                                                                                                                                                                                                                                                          examples/user2.c                                                                                    0100644 0002611 0000666 00000001235 06355551133 0014736 0                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        /* level 2 */
/* Another illustration of the use of standard functions

   Created:  Joe Zachary, October 20, 1992
   Modified:
*/


#include <stdio.h>
#include <math.h>


/* This returns the log base two of x. */

float LOG2 (float x) {
  return(log10(x)/log10(2.0));
}


void main () {

  float x;

  printf("Please enter a float: ");
  scanf("%f", &x);
  printf("The base two logarithm of %f is %f\n", x, LOG2(x));

  printf("Please enter a real number: ");
  scanf("%f", &x);
  printf("The base two logarithm of %f is %f\n", x, LOG2(x));

  printf("Please enter a real number: ");
  scanf("%f", &x);
  printf("The base two logarithm of %f is %f\n", x, LOG2(x));

}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   