摘要: #include <conio.h>void main(void) { int i, j; window(1, 1, 40, 12); for (i = 0; i < 15; i++) { for (j = 0; j < 50; j++) cprintf("%d", j); cprintf("\r\n"); } }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(88) 评论(0) 推荐(0)
摘要: #include <stdio.h>void main(void) { char *workdays[] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "" }; char **work_day; work_day = workdays; while (*work_day) printf("%s\n", *work_day+... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(136) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <dos.h>#include <string.h>// Note: If you want to use XMS function 0xB, this simple // xms_access routine only works for tiny, small, or medium // models where the value of ... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(150) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <ctype.h>#include <conio.h>void main() { char letter; // Letter typed by the user printf("Do you want to continue? (Y/N): "); letter = getch(); // Get the letter letter = t... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(112) 评论(0) 推荐(0)
摘要: #include <stdio.h>void main(void) { char *weekdays[7] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; int i; for (i = 0; i < 7; i++) printf("weekdays[%d] contains %s\... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(92) 评论(0) 推荐(0)
摘要: #include <conio.h>void main(void) { int row, column; clrscr(); cprintf("This is line 1\r\n"); cprintf("Line 2 is a little longer\r\n"); cprintf("This is the last line"); row = wherey(); column = where... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(99) 评论(0) 推荐(0)
摘要: #include <stdio.h>void main(void) { enum { Monday, Tuesday, Wednesday, Thursday, Friday } day; for (day = Monday; day <= Friday; day++) if (day == Monday) printf("No fun---meetings all day Monday\n");... 阅读全文
posted @ 2012-06-04 12:30 XE2011 阅读(132) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <string.h>void main (void) { char line[255]; // Line of text read while (fgets(line, sizeof(line), stdin)) fputs(strupr(line), stdout); }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:29 XE2011 阅读(115) 评论(0) 推荐(0)
摘要: #include <stdio.h>Main () { printf ("This program does not compile."); }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:29 XE2011 阅读(101) 评论(0) 推荐(0)
摘要: #include <stdio.h>void hello_world(void) { printf("Hello, world!\n"); }void main(void) { hello_world(); }通过 Wiz 发布 阅读全文
posted @ 2012-06-04 12:29 XE2011 阅读(142) 评论(0) 推荐(0)