急求C语言编写欢迎界面几秒后跳入菜单界面的程序代码,哪位大神会呀

急求C语言编写欢迎界面几秒后跳入菜单界面的程序代码,哪位大神会呀,第1张

#include

#include

#include

"stdio.h"

void

main()

{

int

n

printf("欢迎界面")//欢迎界面

Sleep(1000)//延时

system("cls")//清屏

//菜单界面

printf("***********************************************\n")

printf("*************1、

***********************\n")

printf("*************2、

***********************\n")

printf("*************3、

***********************\n")

printf("***********************************************\n")

//菜单选择

scanf("%d",&n)

if(n==1){}

else

if(n==2){}

else

if(n==3){}

else

{printf("错误!")}

}

希望能帮助你,喜欢请采纳,有问题欢迎追问!

#include <graphics.h>

#include <stdio.h>

char huan[]={

/* 12*12 '欢'字宋体 汉字字模 */

0x02,0x00,0xfa,0x00,0x13,0xe0,0x94,0x20,

0x55,0x40,0x21,0x00,0x21,0x00,0x52,0x80,

0x4a,0x80,0x84,0x40,0x18,0x20,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

}

char ying[]={

/* 12*12 '迎'字宋体 汉字字模 */

0x42,0x00,0x2d,0xe0,0x09,0x20,0xc9,0x20,

0x49,0x20,0x49,0x20,0x4f,0x20,0x49,0x60,

0x41,0x00,0xb0,0x00,0x8f,0xe0,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

}

char guang[]={

/* 12*12 '光'字宋体 汉字字模 */

0x04,0x00,0x44,0x40,0x24,0x80,0x15,0x00,

0xff,0xe0,0x12,0x00,0x12,0x00,0x12,0x00,

0x12,0x20,0x22,0x20,0xc1,0xe0,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

}

char lin[]={

/* 12*12 '临'字宋体 汉字字模 */

0x22,0x00,0x22,0x00,0xa7,0xe0,0xa5,0x00,

0xa8,0x80,0xa0,0x00,0xa7,0xe0,0xa5,0x20,

0xa5,0x20,0x27,0xe0,0x24,0x20,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

}

void writehz(char *mat,int matsize,int x,int y,int fd,int color)

/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/

{int i,j,k,n

n=matsize/8+1

if(matsize%8==0)

n=n-1

setfillstyle(1,2)

for(j=0j<matsizej++)

for(i=0i<ni++)

for(k=0k<8k++)

if(mat[j*n+i]&(0x80>>k))/*测试为1的位则显示*/

if(fd)

bar(x+i*8*fd+k*fd,y+j*fd,x+i*8*fd+k*fd+fd,y+j*fd+fd)

else

putpixel(x+i*8+k,y+j,color)

}

void huanying()

{

writehz(huan,16,100,180,8,4)

writehz(ying,16,230,180,8,4)

writehz(guang,16,360,180,8,4)

writehz(lin,16,490,180,8,4)

}

void main()

{

int gd=VGA,gm=VGAHI,i

initgraph(&gd,&gm,"")

huanying()

getch()

closegraph()

}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/11141037.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-13
下一篇 2023-05-13

发表评论

登录后才能评论

评论列表(0条)

保存