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 >
Wrap
Text File
|
1989-09-28
|
1KB
|
26 lines
/* thilev.c */
#include <stdio.h>
#include "ibmint.dlc"
#include "hilevel.c"
main()
{ char line[256]; int x ;
setcom() ; /* Initialize communications. */
while(1) /* Endless loop. Use CTRL-C to exit. */
{ rt_puts("type a line of text\n") ; /* Line message to remote. */
rt_gets(line) ; /* Line from remote. */
puts(line) ; /* Line to screen. */
rt_puts("type an integer\n") ; /* Line message to remote. */
rt_gets(line) ; /* Line from remote. */
sscanf(line,"%d",&x) ; /* Convert to integer. */
printf("%d\n",x) ; /* Integer to screen. */
for( x = 0; x < 11 ; x++) /* Put out table of */
{ sprintf(line,"%3d %3d\n",x,x*x) ; /* squares of integers */
rt_puts(line) ; /* to remote. */
} /**/
puts("press a key to continue") ; /* Message to screen. */
while( !kbhit() ) ; getch() ; /* Wait for keypress. */
}
}