资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

c语言中dround函数的简单介绍

c语言颜色函数color怎么使用

函数名: textbackground

创新互联为您提适合企业的网站设计 让您的网站在搜索引擎具有高度排名,让您的网站具备超强的网络竞争力!结合企业自身,进行网站设计及把握,最后结合企业文化和具体宗旨等,才能创作出一份性化解决方案。从网站策划到做网站、成都网站设计, 我们的网页设计师为您提供的解决方案。

功 能: 选择新的文本背景颜色

用 法: void textbackground(int color);

程序例:

#include conio.h

int main(void)

{

int i, j;

clrscr();

for (i=0; i9; i++)

{

for (j=0; j80; j++)

cprintf("C");

cprintf("\r\n");

textcolor(i+1);

textbackground(i);

}

return 0;

}

函数名: textcolor

功 能: 在文本模式中选择新的字符颜色

用 法: void textcolor(int color);

程序例:

#include conio.h

int main(void)

{

int i;

for (i=0; i15; i++)

{

textcolor(i);

cprintf("Foreground Color\r\n");

}

return 0;

C语言背景色怎么弄?

C语言不存在背景色,C语言的编译器可以更换背景色,各种不同的编译器更换背景色的方法不同,需要参考其帮助文件,一般是在编辑环境设置中。

c语言问题

conio.h是一个控制台模式下控制输出的头文件.

它声明几个函数,如果你用到这些函数就要加上此头文件了。

函数如下:

textbackground(color)//设置文本的背景颜色

clrscr()//清屏,(常用)

gotoxy()//定位

textcolor(color);//设置文本颜色

getch()//输入字符不可见。

---回答完毕。

--------下面是conio.h内容--供参考----------------

/***

*conio.h - console and port I/O declarations

*

* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.

*

*Purpose:

* This include file contains the function declarations for

* the MS C V2.03 compatible console I/O routines.

*

* [Public]

*

****/

#if _MSC_VER 1000

#pragma once

#endif

#ifndef _INC_CONIO

#define _INC_CONIO

#if !defined(_WIN32) !defined(_MAC)

#error ERROR: Only Mac or Win32 targets supported!

#endif

#ifndef _MAC

#ifdef __cplusplus

extern "C" {

#endif

/* Define _CRTIMP */

#ifndef _CRTIMP

#ifdef _DLL

#define _CRTIMP __declspec(dllimport)

#else /* ndef _DLL */

#define _CRTIMP

#endif /* _DLL */

#endif /* _CRTIMP */

/* Define __cdecl for non-Microsoft compilers */

#if ( !defined(_MSC_VER) !defined(__cdecl) )

#define __cdecl

#endif

/* Define _CRTAPI1 (for compatibility with the NT SDK) */

#ifndef _CRTAPI1

#if _MSC_VER = 800 _M_IX86 = 300

#define _CRTAPI1 __cdecl

#else

#define _CRTAPI1

#endif

#endif

/* Function prototypes */

_CRTIMP char * __cdecl _cgets(char *);

_CRTIMP int __cdecl _cprintf(const char *, ...);

_CRTIMP int __cdecl _cputs(const char *);

_CRTIMP int __cdecl _cscanf(const char *, ...);

_CRTIMP int __cdecl _getch(void);

_CRTIMP int __cdecl _getche(void);

#ifdef _M_IX86

int __cdecl _inp(unsigned short);

unsigned short __cdecl _inpw(unsigned short);

unsigned long __cdecl _inpd(unsigned short);

#endif /* _M_IX86 */

_CRTIMP int __cdecl _kbhit(void);

#ifdef _M_IX86

int __cdecl _outp(unsigned short, int);

unsigned short __cdecl _outpw(unsigned short, unsigned short);

unsigned long __cdecl _outpd(unsigned short, unsigned long);

#endif /* _M_IX86 */

_CRTIMP int __cdecl _putch(int);

_CRTIMP int __cdecl _ungetch(int);

#if !__STDC__

/* Non-ANSI names for compatibility */

_CRTIMP char * __cdecl cgets(char *);

_CRTIMP int __cdecl cprintf(const char *, ...);

_CRTIMP int __cdecl cputs(const char *);

_CRTIMP int __cdecl cscanf(const char *, ...);

#ifdef _M_IX86

int __cdecl inp(unsigned short);

unsigned short __cdecl inpw(unsigned short);

#endif /* _M_IX86 */

_CRTIMP int __cdecl getch(void);

_CRTIMP int __cdecl getche(void);

_CRTIMP int __cdecl kbhit(void);

#ifdef _M_IX86

int __cdecl outp(unsigned short, int);

unsigned short __cdecl outpw(unsigned short, unsigned short);

#endif /* _M_IX86 */

_CRTIMP int __cdecl putch(int);

_CRTIMP int __cdecl ungetch(int);

#endif /* __STDC__ */

#ifdef __cplusplus

}

#endif

#endif /* _MAC */

#endif /* _INC_CONIO */

----------------------------------------------


分享标题:c语言中dround函数的简单介绍
分享路径:http://cdkjz.cn/article/hpejie.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220