写个小程序祝大家中秋快乐:
#include <stdio.h>
int main ()
{
while (1)
{
printf("\x1b[2J"); /* clear screen and home cursor */
printf("\x1b[31;40m"); /* red foreground, black background */
printf("\x1b[11;29H"); /* moves cursor to line 11, column 29 */
printf("+-----^--^-----+\n");
printf("\x1b[12;29H");
printf("\x1b[40;31;5m| 中秋快乐 |\n\x1b[0m ");
printf("\x1b[13;29H");
printf("+-------V------+\n");
sleep(1);
printf("\x1b[2J"); /* clear screen and home cursor */
printf("\x1b[31;40m"); /* red foreground, black background */
printf("\x1b[11;29H"); /* moves cursor to line 11, column 29 */
printf("+-----^--^-----+\n");
printf("\x1b[12;29H");
printf("\x1b[40;32;1m| 中秋快乐 |\n\x1b[0m ");
printf("\x1b[13;29H");
printf("+-------V------+\n");
sleep(1);
}
return 0;
}
[此贴子已经被作者于2006-10-6 20:01:02编辑过]