A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 又欠又欠 中级黑马   /  2016-3-31 21:21  /  589 人查看  /  1 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

【程序32】  
题目Press any key to change color, do you want to try it. Please hurry up!  
1.程序分析              
2.程序源代码  
#include <conio.h>  
void main(void)  
{  
int color;  
for (color = 0; color < 8; color++)  
{   
textbackground(color);/*设置文本的背景颜色*/  
cprintf("This is color %d\r\n", color);  
cprintf("Press any key to continue\r\n");  
getch();/*输入字符看不见*/  
}  
}

1 个回复

倒序浏览
conio.h 文件在xcode中并不能使用   怎么办?
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马