没有合适的资源?快使用搜索试试~ 我知道了~
打字游戏 标准C语言
需积分: 9 13 下载量 161 浏览量
2008-10-23
11:21:45
上传
评论 1
收藏 7KB TXT 举报
温馨提示
试读
19页
一款简单的打字游戏,用C语言写的....................
资源推荐
资源详情
资源评论
#include <stdio.h>
#include <graphics.h>
#include <conio.h>
#include <dos.h>
#include <time.h>
char sing[101];
void Background()
{
int driver=DETECT,mode; /*定义变量*/
int x1=20,y1=20,r=10,num;
int x2=20,y2=450;
int color1=10,color2=10; /*在此设置颜色,一改全改*/
initgraph(&driver,&mode,"a:\\bgi "); /*初始化图形模式*/
setcolor(color1); /*步骤一、设置当前颜色用于绘图*/
#include <graphics.h>
#include <conio.h>
#include <dos.h>
#include <time.h>
char sing[101];
void Background()
{
int driver=DETECT,mode; /*定义变量*/
int x1=20,y1=20,r=10,num;
int x2=20,y2=450;
int color1=10,color2=10; /*在此设置颜色,一改全改*/
initgraph(&driver,&mode,"a:\\bgi "); /*初始化图形模式*/
setcolor(color1); /*步骤一、设置当前颜色用于绘图*/
for(num=0;num<30;num++ )
{
circle(x1,y1,r); /*步骤二、使用当前颜色绘制一个闭合图形*/
setfillstyle(num,color1); /*步骤三、设置填充方式*/
floodfill(x1,y1,color1); /*步骤四、对闭合图形进行填充*/
x1 =20;
delay(100);
}
setcolor(color2);
for(num=0;num<30;num++)
{
circle(x2,y2,r);
setfillstyle(num,color2);
floodfill(x2,y2,color2);
x2 =20;
{
circle(x1,y1,r); /*步骤二、使用当前颜色绘制一个闭合图形*/
setfillstyle(num,color1); /*步骤三、设置填充方式*/
floodfill(x1,y1,color1); /*步骤四、对闭合图形进行填充*/
x1 =20;
delay(100);
}
setcolor(color2);
for(num=0;num<30;num++)
{
circle(x2,y2,r);
setfillstyle(num,color2);
floodfill(x2,y2,color2);
x2 =20;
剩余18页未读,继续阅读
资源评论
owenwilltmac
- 粉丝: 3
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功