home *** CD-ROM | disk | FTP | other *** search
- main() /* locate.c -- illustrates use of locate() */
- {
-
- int a,b,c,d;
- c = 1;
- b = 1;
- a=1;
-
- cls();
-
- locate(3,35,0);
- puts("RUN/C SAMPLE BOX");
- locate(1,1,0);
- puts("\t* * * * * * * * * * * * * * * **** * * * * * * * * * * * * * * *");
- while(a < 12){
- b *= -1;
- (b > 0) ? locate(0,64,1) : locate(++a,8,0);
- putchar('*');
- }
-
- locate(0,64,1);
- putchar('*');
-
- locate(12,8,0);
- d = 9;
- while(c < 13)
- {
- b *= -1;
- (b > 0) ? locate(12,(80-d),0) : locate(12,d,0);
- putchar('*');
- ++c;
- ++d;
- }
- locate(12,30,0);
- puts("Gee, is this windowing?");
-
- }