hello3.c

来自「unix linux 编程实践源代码」· C语言 代码 · 共 26 行

C
26
字号
/* hello3.c *	purpose	 using refresh and sleep for animated effects *	outline	 initialize, draw stuff, wrap up */#include	<stdio.h>#include	<curses.h>main(){	int	i;	initscr();	   clear();	   for(i=0; i<LINES; i++ ){		move( i, i+i );		if ( i%2 == 1 ) 			standout();		addstr("Hello, world");		if ( i%2 == 1 ) 			standend();		sleep(1);		refresh();	   }	endwin();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?