C语言——实例033 gotoxy()与clrscr()函数

/*
	Name: 
	Copyright: 
	Author: 
	Date: 31/07/17 10:54
	Description: 
		【程序33】题目:学习gotoxy()与clrscr()函数 
		
	clrscr():清屏函数	
		①只有在Turbo C 中可以运行 !
		②在Turbo C++ 中,需要先另存为(save as).C格式,才能使用。	
		
	gotoxy(): 将光标移动到指定位置说明
		gotoxy仅在TC及BC下可以使用。???? 
		用法:#include 
		功能:将光标移动到指定位置说明:gotoxy(x,y)将光标移动到指定行y和列x。
		设置光标到文本屏幕的指定位置,其中参数x,y为文本屏幕的坐标。
		gotoxy(0,0)将光标移动到屏幕左上角。   
*/

#include 
int main()
{
	clrscr();		/*清屏函数*/
	textbackground(2); 
	gotoxy(1,5);
	cprintf("Output at row 5 column 1\n");
	textbackground(3);
	gotoxy(20,10);
	cprintf("Output at row 10 column 20\n");
	return 0;
} 

你可能感兴趣的:(C语言)