您的位置:首页 > 编程语言 > C语言/C++

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

2017-08-01 09:38 288 查看
/*
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 <system.h>
功能:将光标移动到指定位置说明:gotoxy(x,y)将光标移动到指定行y和列x。
设置光标到文本屏幕的指定位置,其中参数x,y为文本屏幕的坐标。
gotoxy(0,0)将光标移动到屏幕左上角。   
*/

#include <stdio.h>
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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: