home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_06_04 / v6n4071b.txt < prev    next >
Text File  |  1989-09-28  |  1KB  |  26 lines

  1. /* thilev.c */
  2. #include <stdio.h>
  3. #include "ibmint.dlc"
  4. #include "hilevel.c"
  5.  
  6. main()
  7. { char line[256]; int x ;
  8.   setcom() ;                              /* Initialize communications.  */
  9.   while(1)                        /* Endless loop. Use CTRL-C to exit.   */
  10.    { rt_puts("type a line of text\n") ;   /* Line message to remote.     */
  11.      rt_gets(line) ;                      /* Line from remote.           */
  12.      puts(line) ;                         /* Line to screen.             */
  13.      rt_puts("type an integer\n") ;       /* Line message to remote.     */
  14.      rt_gets(line) ;                      /* Line from remote.           */
  15.      sscanf(line,"%d",&x) ;               /* Convert to integer.         */
  16.      printf("%d\n",x) ;                   /* Integer to screen.          */
  17.      for( x = 0; x < 11 ; x++)            /* Put out table of            */
  18.       { sprintf(line,"%3d %3d\n",x,x*x) ; /* squares of integers         */
  19.         rt_puts(line) ;                   /* to remote.                  */
  20.       }                                                                /**/
  21.     puts("press a key to continue") ;     /* Message to screen.          */
  22.     while( !kbhit() ) ; getch() ;         /* Wait for keypress.          */
  23.    }
  24. }
  25.  
  26.