/* inputfile.c: P.Conrad's version of Lesson  3_6 from Tan and D'Orazio */

#include <stdio.h>
#include <stdlib.h> /* for exit() function */

int main(void)
{
  /* declare variables */
  double xx ;
  int   ii, kk; 
  FILE *inptr;
 
  inptr=fopen ("C3_6.IN","r"); 
  if (inptr == NULL)
    {
      fprintf(stderr,"Could not open C3_6.IN\n");
      fprintf(stderr,"Sorry.  This program is done!\n");
      exit(-1);
    }
  fscanf(inptr,"%d",&ii);  /* read an integer from C3_6.IN */
  fscanf(inptr,"%d %lf",&kk,&xx); /* read an int and a double from C3_6.IN */

  fclose(inptr); 
  
  printf("ii=%5d\nkk=%5d\nxx=%9.3lf\n",ii, kk, xx); 
  
  return 0;

}




