关于C语言程序代码加颜色的问题!

来源:百度知道 编辑:UC知道 时间:2024/06/24 17:06:00
#include "stdio.h" /*I/O函数*/
#include "stdlib.h" /*其它说明*/
#include "string.h" /*字符串函数*/
#include "conio.h" /*屏幕操作函数*/
#include "mem.h" /*内存操作函数*/
#include "ctype.h" /*字符操作函数*/
#include "alloc.h" /*动态地址分配函数*/
#include "stdio.h" /*I/O函数*/
#include "bios.h" /*ROM基本输入输出函数*/
#include "dos.h" /*dos接口函数*/
#include "alloc.h" /*动态地址分配函数*/
main()
{
char *f[]= { /*定义菜单字符串数组*/
"*************MENU***********", /*菜单的标题行*/
"0. shuru",
"1. xianshi",
"2. xiugai \n",
"3. chazhao",
"4. shanchu",
"5. zairu",
"6. quit",
}; /*退出*/
char s[80];
int i;
int key=0; /*记录所压键值*/
int c=0;
clrscr(); /*清屏*/

textco

我这儿没有环境,你试一下吧:
#include "stdio.h" /*I/O函数*/
#include "stdlib.h" /*其它说明*/
#include "string.h" /*字符串函数*/
#include "conio.h" /*屏幕操作函数*/
#include "mem.h" /*内存操作函数*/
#include "ctype.h" /*字符操作函数*/
#include "alloc.h" /*动态地址分配函数*/
#include "stdio.h" /*I/O函数*/
#include "bios.h" /*ROM基本输入输出函数*/
#include "dos.h" /*dos接口函数*/
#include "alloc.h" /*动态地址分配函数*/
main()
{
char *f[]= { /*定义菜单字符串数组*/
"*************MENU***********", /*菜单的标题行*/
"0. shuru",
"1. xianshi",
"2. xiugai \n",
"3. chazhao",
"4. shanchu",
"5. zairu",
"6. quit",
}; /*退出*/
char s[80];
int i;
int key=0; /*记录所压键值*/
int c=0;
clrscr(); /*清屏*/

textcolor(YELLOW); /*设置文本颜色为