


版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、程序设计综合实验实验地点:实验学期:学生班级:学生学号:学生姓名:任课教师:龚勋信息科学与技术学院2012年4月实验一:ATM机用户操作界面、业务逻辑编写实验目的及内容1、根据ATM的工作流程编写用户界面,掌握文本用户菜单的编 写方法;2、根据ATM的工作流程编写业务罗杰,掌握搭建一个完整的应 用系统的方法及软件编程思想。实验要求1、 除提示用户输入的数字外,界面上不能响应、出现任何其他用 户输入;2、每个菜单界面独立显示,不要出现多组菜单重叠显示的现象;3、每个业务逻辑可以多次执行,直到用户选择退出业务。实验步骤及核心代码void mai n() int bExit=O;char in;控制
2、语言的选择while(!bExit)Mai nMen u();in=getch();system("cls");switch(in) .语言选择void Mai nMen u() void Lan guageMe nu (i nt t)int cExit=0;char in; while(!cExit)if(t=1)显示中文功能选择菜单in=getch();system("cls");switch(i n)中文功能函数的选择else 同上,只需将中文函数改为英文函数中文的查询函数void Query1()prin tf("=n")pr
3、intf("此账户有 .2f元 n",sum);对sum已初始化system("pause");system("cls");中文的存钱函数void Deposit1(float *p)float x;prin tf("=n");printf(”输入您要存的数目:”);scan f("%f', &x);*p+=x;system("pause");system("cls");中文的取钱函数void WithDraw1(float *p)float y;i
4、nt a=1;prin tf("=n");printf("输入您要取的数目:");while(a)scan f("%f", &y);if(y>sum)printf("n余额不足,按任意键后重新输入n"); else *p-=y;a=0;system("pause");system("cls");实验二:进制转换器实验目的及内容写一个进制转换器,实现十进制、二进制、十六进制的相互转换实验要求1、转换要求包括整数和小数;2、提供清晰、有好的用户界面;3、各种转换可以
5、反复多次执行,直到用户选择”退出“按钮。实验步骤及核心代码void mai n() .void Mainmenu() .二进制到十进制和十六进制void BtoDH()int iExit=0;while(!iExit) system("cls");stri ng s1,s2,s3,s;int i,le n;.输入字符串ss=s1;Ien=s1.len gth();for(i=0;i<le n;i+)s3=s1.substr(0,1);/截取从0到1的字符,包括0不包括1s仁 s1.substr(1,s1.le ngth()-1);if(s3="."
6、) s2=s.substr(0,i);/截取 0 到 i 的字符break;if(s2.le ngth()=O)s2=s;s1=""int in=BtoDi nt(s2);把二进制数分离开后,调用整数部分float dou=BtoDdecimal(s1);/ 调用二进制小数部分dou=in+dou;stri ng ss1,ss2;ss仁 BtoHi nt(s2,1);ss2=BtoHi nt(s1,0);输出十进制形式和十六进制形式二进制整数到十进制整数int BtoDi nt(stri ng s)int i,ss=0,le n,l;len=s.len gth()-1;l=
7、le n;for(i=0;i<=le n;i+)stri ng ch=s.substr(0,1); s=s.substr(1,s.le ngth()-1); if(ch="1")ss+=pow(2,l);l-;elsel-;return ss;二进制小数到十进制小数float BtoDdecimal(stri ng s)float ss=0.0;int i,le n,l;len=s.len gth()-1;l=-1;for(i=0;i<=le n;i+)stri ng ch=s.substr(0,1);s=s.substr(1,s.le ngth()-1);if
8、(ch="1")ss+=pow(2,i);pow函数返回值为计算 2的i次方l-;elsel-;return ss;/十六进制到二进制和十进制void HtoBD()int iExit=0,le n,i;stri ng s,s1,s3,s2,ss1,ss2;while(!iExit)system("cls");cout<<"please in put the nu mber"cin> >s1;s=s1;Ien=s1.len gth();for(i=0;i<le n;i+)s3=s1.substr(0,1)
9、;s仁 s1.substr(1,s1.le ngth()-1);if(s3=".")s2=s.substr(0,i); break;if(s2.le ngth()=O)s2=s;s1=""ss仁 HtoBi nt(s2,1);ss2=HtoBi nt(s1,0);int in=BtoDi nt(ss1);float dou=BtoDdecimal(ss2);dou=in+dou;/输出二进制形式和十进制形式stri ng HtoB in t(stri ng s,i nt in)stri ng s1;int len;len=s.len gth();stri
10、 ng ret=""for(i nt i=0;i<le n; i+)s1=s.substr(0,1); s=s.substr(1,s.le ngth()-1);if(in=1)ret=HtoBbit(s1)+ret;elseret+=HtoBbit(s1);return ret;/十六进制字符与二进制字符串的互相转换stri ng HtoBbit(stri ng s)stri ng ret;if(s="0")ret="OOOO"二进制到十六进制stri ng BtoHin t(stri ng s,i nt in)int len=
11、s.len gth();int t=le n%4;len=(4-t)%4;while(le n-)if(in=1)s="0"+s;elses+="0"int num=s.len gth()/4,i;stri ng ret;for(i=0;i< nu m;i+)stri ng temp=s.substr(0,4);s=s.substr(4,sen gth()-4);ret+=BtoHbit(temp);/BtiHbit函数使二进制字符串与十六进制字符互相转换,与上面相似,略写return ret;/十进制到二进制和十六进制void DtoBH()do
12、uble num,n2;int iExit=0,le n,n1;stri ng s1,s2,s3,s4;while(!iExit)system("cls");cout<<"please in put the nu mber and the len gth of decimal "cin»num >>le n;n仁in t( nu m);n2=num-n1;s仁 DtoBdecimal( n2,le n);s2=DtoBi nt( n1);s3=BtoHi nt(s2,1);s4=BtoHi nt(s1,2);/输出二进制
13、形式和十六进制形式/十进制小数到二进制小数stri ng DtoBdecimal(double in ,i nt len)stri ng ret;double p=in;while(le n-)p*=2;if(p>=1)ret+="1"p-=1.0;elseret+="0"return ret;/十进制整数到二进制整数string DtoBi nt(i nt i n)if(in=0)return "0"stri ng ret=""int q=i n, rema in;while(q)rema in=q%2;q
14、=q/2;if(remai n)ret="1"+ret;elseret="0"+ret;return ret;实验三:随机数生成、中奖者实验目的及内容生成一组均匀分布的伪随机数,根据随机数编写一个抽奖程序实验要求1、能够根据用户的输入,控制随机数生成的数目,随机数用动态数组保存;2、能够根据用过的输入,控制随机数的范围:比如能够生成一组【a,b】范围内的随机数;3、 由用户输入抽奖者人数N;4、为每一个人分配一个代号(类似于名字)和一个随机号码(即抽奖票号,加你控制在1-N之间)并将其打印出来;5、 由机器摇号:生成一个在1-N之间的随机数作为中奖号码,
15、查找中奖者,并公布中奖者信息(注:可以有多人同时中奖);6、如果没有对应的中奖者,需要将该号码公布出来,然后重新生成一个中奖号码,知道中奖者存在为止。 实验步骤及核心代码#in clude<iostream>#in clude<time.h>#in clude<stri ng>using n amespace std;static un sig ned holdra nd=1L;void Lottery(i nt n);void mysra nd(un sig ned seed);int myran d(void);in t llottery(i nt nu
16、 m);int n;struct PEOPLEchar *n ame;int nu mber;mem100;void mai n()cout<<"I nput the total nu mber of the people:"cin»n;cout<<"="<<e ndl;cout<<"I nformati on of all:"<<e ndl;Lottery( n);void Lottery(i nt n)int i,N,k;int num;cout<<
17、"I nput N:"cin>>N;mysra nd( un sig ned)time(NULL);for(i=0;i< n;i+)k=myra nd();k=k%(N-1)+1;memi. nu mber=k;for(i=0;i< n;i+)cout<<e ndl<<i+1<<": p"<<i<<","<<"his nu mber is "<<memi. nu mber;num=myra nd();num=
18、nu m%(N-1)+1;while(川ottery( nu m)num=myra nd();num=nu m%(N-1)+1;void mysra nd(un sig ned seed)holdra nd=seed;int myran d(void)return(holdra nd=holdra nd*201413+2531011L)>>16) &0x7ff);in t llottery(i nt num)int i,j=0;cout<<e ndl<<"The in valid lottery nu mber is:"<
19、<num <<e ndl; for(i=0;i< n;i+)if(memi. nu mber=num) cout<<"The in valid is: p"<<i<<","<<"his nu mber is"<<memi. nu mber<<e ndl; j+;if(j=0)return 0;elsereturn 1;实验四:插入排序、快速排序实验目的及内容1、生成一组随机整数,对该组数据进行排序,采用插入排序法;2、生成一组随机整数,对该
20、组数据尽心排序,采用快速排序法。实验要求1、数组长度由用户输入;2、随机数范围在【100,10000】范围内;3、采用插入排序法和快速排序法进行排序;4、根据用户要求,可以实现增序、降序两种排序。实验步骤及核心代码1、插入排序int mai n()/用户定义数组长度lenlottery(le n);void lottery(i nt le n) int i;char ch;mysrand(unsigned)time(NULL);/time 函数返回 1970 年 1 月 1 日 00:00:00 起距函数调用时相聚的时间,以秒为单位,在time.h的头文件中if(ch='1')
21、swap1(b,le n);/ 升序else if(ch='2')swap2(b,le n);降序for(i=0;i<le n; i+)cout<<bi<<e ndl;void mysra nd(un sig ned seed)int myra nd(void)/此函数在实验三里有写 h=h%(10000-100)+100; /控制随机数范围在【100-10000】之内, return h;void swap1(i nt *c,i nt n)int i,j,x,k=1;c0=myra nd();for(j=1;j< n;j+)x=myra n
22、d();i=j-1;while(i>=0&&ci>x)ci+1=ci;i-;ci+1=x;2、快速排序void mai n()int A100 ,n,k;./用户定义数组长度int exit=0;char ch;while(!exit)for(i nt i=0;i< n; i+)k=myra nd();/与产生随机数有关的函数略,实验三有写k=k%(MAX-MIN)+MIN;/控制随机数的范围,MIN=1,MAX=100,在开始有定义Ai=k;mainmenu();mainmenu函数为主菜单,略写ch=getch();system("cls&quo
23、t;);switch(ch)case'1':QuikUp(A,0, n-1);prin t(A, n);system("pause");system("cls");break;case 2:QuikDow n(A,0, n-1);prin t(A, n);system("pause"); system("cls"); break;case'3':exit=1;default:pri ntf("error!n");break;/升序排序void QuikUp(i n
24、t a,i nt p,i nt r)if(p>=r)return;int i=p;int j=r+1;int x=ap;while(1)while(i<=r&&a+i<x);while(j>=p&&a-j>x);if(i>=j) break;Swap(&ai,&aj);/Swap函数为交换*p与*q的值,略写if(i=j)j-;ap=aj;aj=x;QuikUp(a,p,j-1);QuikUp(a,j+1,r);实验五:模块计时器、常用排序算性能测试实验目的及内容设计一组计时函数,封装所有计时函数,采用测试性能
25、函数对快速函 数、插入函数、选择排序算法进行性能测试。实验要求1、计时精确:封装的高精度的计时 API函数QueryPerforma nceCou nter(),可以达到微秒级的精度;2、 使用简单:只用在待测试的模块前后加上两个宏BM_STAR1和 BM_ENDp需要对结果进行计算,也不需要考虑对各个模块结果数据的维护;3、多组测试:最多可以同时实现 20个模块的测试,及可以保存 20 组数据;4、结果输出独立:在系统运行结果时,只需要用一个函数就可以把计时结果保存在一个文本文件里5、对一组数据进行排序;6、数组长度为10000,数组应随机产生;7、 为了保证测试数据的稳定,每种排序算法运行
26、10次,计算总的时 间实验步骤及核心代码void mai n() int i;int retBENCHMARK_MAX_COUNT;BENCHMARK_MAX_COUNT为模块总数In itBe nchmark();BMTimerStart(1);/ 开始计时for(i=0;i<10;i+)sort_quick(a,10000);快速排序,实验四有写,略写sort_chr(a,10000);/插入排序,实验四有写,略写sort_choice(a,10000);/ 选择排序,略写BMTimerE nd(1);/ 结束计时WriteData(1,"Test1","
27、;D:log.txt");/ 将数据填入文件中void In itBe nchmark()ResetBenchmarkCounters();对数组 gStats,gEnds,gCounter 清零GetClockFreque nt();/获得机器内部定时时钟频率void BMTimerStart(i nt iModel)LARGE_INTEGER litmp;QueryPerformanceCounter(&litmp);/提高精度,在头文件 "windows.h"中gStartsiModel=litmp.QuadPart;void BMTimerE nd
28、(i nt iModel)LARGE_INTEGER litmp;QueryPerforma nceCo un ter( & litmp);gEn dsiModel=litmp.QuadPart;void WriteData(i nt TotalCo un t,stri ng sModel,stri ng path)/open the file and move pointer to the end of the file ,需要头文件 "fstream"ofstream pFile(path.data(),ios:app|ios:out);1 Headerstri
29、 ng title,s2;stri ng sperator="r nrn=r n" title="Model-"+sModel;char temp1100,temp2100;spri ntf(temp1,"rnlteratio n Cou nter:5drn",TotalCou nt);title+=temp1;2 Timesstri ng s;double gTotal=0;for(i nt i=0;i<BENCHMARK_MAX_COUNT;i+)将结果写进文件if(gCo un tersi=0)con ti nue;spr
30、i ntf(temp1,"Total %d",i);int len=strle n( temp1)/8;/* calculate the nu mber of 't's+=temp1;for(;le n< 2;le n+)s+="t"spri ntf(temp2,":%d msr n",(i nt)(gCou ntersi/1000);gTotal+=gCo un tersi;/Calculate the total ticks.s+=temp2;char temp100;spri ntf(temp,"
31、* Total:%d ms *rn",(i nt)gTotal/1000);s+=temp;/write en tire stri ng at one times2=sperator+title+s;pFile<<s2;pFile.close();void GetClockFreque nt()QueryPerforma nceF reque ncy(&litmp);dfFreq=(double)litmp.QuadPart; /dfFreq 用于保存时钟频率,为全局变量,已赋初值为1void ResetBe nchmarkCo un ters() int i;f
32、or(i=0;i<BENCHMARK_MAX_COUNT;i+)gEn dsi=O;/保存终止计时的计数器的值gCo un tersi=O;实验六:小型管理信息系统实验目的及内容用单链表实现一个小型学生管理信息系统,实现除存储以外其他 基本的信息管理功能。实验要求1、编写友好的用户界面;2、采用带头结点的单链表实现对数据的组织,不允许使用数组;3、学生信息包括学号、姓名、成绩;4、有添加学生、查询学生、编辑学生、删除学生、打印等的功能实验步骤及核心代码struct stude nt * in sert(struct stude nt * head,struct stude nt * st
33、d)struct stude nt *p0,*p1,*p2;p1=head->n ext;p0=std;p2=head;if(p1=NULL) head->next=pO;p0->next=NULL ; elsewhile(atoi(pO->ID)>atoi(p1->ID)&&(p1-> next!=NULL)p2=p1; p1=p1-> next; if(atoi(pO->ID)<atoi(p1->ID) p2->next=pO; p0->next=p1; else p1->next=pO;
34、p0->next=NULL; return(head);/添加学生信息struct stude nt *Add_stu(struct stude nt *stu)struct stude nt *p1;int n=O,exit=O;p1=(struct stude nt*)malloc(LEN);while(!exit)/输入学号并且判断学号是否是4位,不是4位则退出/输入学生的信息stu=i nsert(stu,p1);/查询学生信息void Inqu ir_stu(struct stude nt *stu) char nu mber5;struct stude nt *p;cin&g
35、t;>nu mber;/根据学生学号来查询学生信息p=stu;do if(!(strcmp(p->ID,number)./输出学号匹配的学生的信息p=p->n ext;while(p!=NULL);/编辑学生信息struct stude nt * Edit_stu(struct stude nt *stu) struct stude nt *p;char nu mber5;cin»nu mber;p=stu;doif(!(strcmp(p->ID, nu mber)/输出学生信息并且提示用户选择修改信息char in;in=getch();switch(in)
36、 /转换in,进行选择修改信息 p=p->n ext;while(p!=NULL);SYSTEM();return stu;删除学生信息struct stude nt *Delete_stu(struct stude nt *stu) int sigh=O,exit=O;struct stude nt *p1,*p2;stri ng nu mber;p仁stu->n ext;p2=stu;Prin t_stu(stu);while(!exit)/输入学生学号if(number="OOOO")II提示所有学生信息已经删除并且使结点连接到头结点else while(
37、p1!=NULL) if(strcmp(p1->ID ,nu mber.data()=O) sigh=1; p2->n ext=p1- >n ext; break;else p2=p1; p1=p1- >n ext; if(sigh) .提示学生信息已删除并退出elsecout<<"没有找到学号为"<<number.data()<<"的学生,请确认学号输入是否正确! "<<e ndl;实验七:文本文件、二进制文件格式的保存读取实验目的及内容在上个实验的基础上对数据进行保存与读取实验要
38、求1、用文本(字符)文件格式进行数据的保存与读取2、文件的存储路径,提示用户输入3、存盘成功后或者失败,输出提示信息4、数据读入后能够修改保存5、能够修改存盘及数据读取函数,添加二进制文件实现数据的保存与读取的功能实验步骤及核心代码/*以下几个实验程序代码同上个实验的相关程序代码*/struct stude nt * in sert(struct stude nt * head,struct stude nt * std) struct stude nt *Add_stu(struct stude nt *stu)void Inqu ir_stu(struct stude nt *stu)vo
39、id edit_ name(struct stude nt *p)void edit_score(struct stude nt *p)struct stude nt * Edit_stu(struct stude nt *stu)void Prin t_stu(struct stude nt *stu) struct stude nt *Delete_stu(struct stude nt *stu)void Total_stu(stude nt *stu) void Docume nt_Save() system("cls");*文本文件保存 *FILE *fp;cou
40、t<<"输入文件名:” stri ng file name;cin> >file name;if(fp=fope n(file name.data(),"wt")=NULL)cout<<"ca nnot ope n the file!"<<e ndl;retur n;stude nt *p=list->n ext;while(p!=NULL)fprin tf(fp,"%s %s %.2fn",p->ID,p-> name,p->score);p=p-&g
41、t; next; fclose(fp);if(!p)cout<<"数据已经成功保存在:"<<filename<<"中! "<<endl;elsecout<<"存盘失败!"<<e ndl;/*文本文件读*/void Docume nt_Read()system("cls");FILE *fp;stri ng file name;cout<<"输入文件名:"cin> >file name;if(fp=fo
42、pe n(file name.data(),"rt")=NULL) cout<<"ca nnot ope n the file!"<<e ndl;retur n; stude nt *newno de;while(1) if(feof(fp) break;newno de=(stude nt *)malloc(LEN);fscan f(fp,"%s%s%fn", newno de->ID ,newno de->n ame,&(newno de->score); in sert(list
43、, newno de);关闭文件*一进制文件保存 */void Bi nary_Save() if(fp=fope n(file name.data(),"wb")=NULL) cout<<"ca nnot ope n the file!"<<e ndl;stude nt *p=list->n ext;return; while(p!=NULL) fwrite(p,sizeof(stude nt),1,fp);p=p->n ext;fclose(fp);if(!p)cout<<"数据已经成功保存在
44、:"<<filename<<"中!"<<endl;else cout<<"存盘失败!"<<e ndl;*二进制文件读取*void Bin ary_Read() cout<<"输入文件名:"cin> >file name;if(fp=fope n(file name.data(),"rb")=NULL)cout<<"ca nnot ope n the file!"<<e ndl;r
45、etur n;stude nt *newno de;while(1)newno de=(stude nt *)malloc(LEN);fread( newno de,sizeof(stude nt),1,fp);if(feof(fp)free( newno de);break;in sert(list, newno de);.关闭文件实验八:系统信息读取、系统操作命令实验目的及内容和系统交互、读取保存在系统中的区域信息,比如日期格式、货币符号等,掌握程序休眠、获取当前时间的方法实验要求1、输出当前区域设置中的日期格式;2、货币符号;3、千位分隔符;4、小数分隔符;5、日期分隔符;6、时间分隔符
46、;7、时间制式(24小时or12小时);8使用sleep函数,使程序获取当前时间的方法;秒:年份”;9、获取当前时间,格式为:“星期 月 日小时:分: 实验步骤及核心代码#in clude<stdio.h>#in clude<time.h>#in clude<dos.h>#ifndef _TIME_TDEFINEDtypedef long time_t;#defi ne _TIME_T_DEFINED#en difvoid mai n()time_t curre nt_time;sleep(5);time(&curre nt_time);prin t
47、f("%s",ctime(&curre nt_time);实验九:判断文件属性、创建文件夹实验目的及内容通过系统库函数判断文件的各种属性(存在性、只读性等) ,学习创 建文件夹的方法,通过库函数设计一个密码程序,如同其他DOSS序 一样,要求输入密码并禁止回显。实验要求1、用户输入任意一个文件名,(包括路径,如d:test.txt ),写程 序该文件食肉存在;2、用户输入任意一个文件名,指出该文件的属性,例如不存在则创 建它;3、把以上3个功能集成在一个程序,提供一个用户菜单,供用户选 择测试;4、实现从控制台读入密码,并禁止回显;5、在程序中预设一个密码(8个字符
48、以内),将用户输入与之进行匹 配;6、用户只有3次机会,如果用户输入不正确,提醒输入错误,并提 醒剩下的输入次数; 7、如果密码正确,则刷屏,进入用户欢迎界面;&如果三次输入错入,退出程序。实验步骤及核心代码1、判断文件属性、创建文件夹/*判断文件是否存在*/void existe nce()system("cls");char docume nt20;cout<<"l nput the n ame of a docume nt:"<<e ndl; sca nf("%s",docume nt);if(a
49、ccess(docume nt,O)=O)cout<<"The docume nt exists!"<<e ndl; elsecout<<"The docume nt does not exist!"<<e ndl; system("pause"); void attribute()*护廿断文件的属丿性 *system("cls");char docume nt20;cout<<"I nput the n ame of a docume nt:&
50、quot;<<e ndl;sca nf("%s",docume nt);if(access(docume nt,O)=O)cout<<"Existe nee only" <<e ndl;elseif(access(docume nt,2)=0)cout<<"Write permissi on"<<en dl;elseif(access(docume nt,4)=O)cout<<"Read permissi on"<<en dl;el
51、seif(access(docume nt,6)=0)cout<<"Read and write permissi on "<<e ndl;system("pause");/*如果文件夹不存在则创建一个文件夹*/void Create()system("cls");char docume nt20;cout<<"l nput the n ame of the docume nt:"<<e ndl;sca nf("%s",docume nt);if(
52、access(docume nt,O)=O) cout<<"The docume nt already exists!"<<e ndl;else cout<<"The docume nt does not exist.Please waite."<<e ndl; if(mkdir(docume nt)=O) cout<<"The docume nt now exist!"<<e ndl; elsecout<<"Creat fail!"
53、;<<e ndl; system("pause");2、密码输入#in clude<stdio.h>#in clude<stri ng.h>#in clude<dos.h>void mai n()char pass10="123456"char *p;int t=3;p=getpass("E nter Password:");while(t!=0) if(strcmp(p,pass)=O)prin tf("* nWei comen* t=0; else if(t=0) retu
54、r n;prin tf("Password In correct,%d times leftn",-t); p=getpass("E nter Password:");实验10:视窗程序编程基础、重叠对话框实验目的及内容练习TC提供的屏幕操作函数,并且实现美观通用的弹出式对话框进 行消息提示。实验要求1、 掌握 window、clrscr、textbackground、textcolor 等函数功能及使用方法,实现在屏幕中打开一个小窗口,在窗口中显示两行文字, 要求将屏幕背景设置为白色,窗口背景设置为蓝色,文字颜色为黄色;2、为使窗口更加没换,为其绘制边
55、框;3、实现一个对话框,为体现对话框的立体感,要求绘制其阴影,将对话框分为上、下两部分:上部分为标题,下部分为标题栏,居中显 示对话框标题;下部分为信息栏,显示相关消息,可以有多行。要求 写一个对话框函数,根据用户的输入的参数,可以显示不同的对话框 实验步骤及核心代码#in clude<stdio.h>#in clude<c oni o.h>#in clude<time.h>static un sig ned holdra nd=1L;void Dialog(i nt x0,i nt yO,i nt iWidth,i nt iRow,char *sTitle
56、,char *in formatio n);void mysra nd(un sig ned seed)holdra nd=seed;int myran d(void)return(holdra nd=holdra nd*214013L+2531011L)>>16)&0 x7ff);void mai n()int buf;long i;char c;char *sTitle="*NOTICE*"char *in formatio n2="This is the first text win dow program","pre
57、ss any key to begi n your exploration"mysra nd( un sig ned)time(NULL);for(i=0;i<600;i+)prin tf("%d",myra nd);buf=(char *)malloc(10*40*2);gettext(20,10,70,20,buf);prin tf("Do you want to ope n the small wi ndow? Y/N");scan f("%c",&c);if(c='Y')Dialog(20,10,50,2,sTitle,i nformatio n 2);prin tf("Do you want to clo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 行政法学新情况与试题答案探讨
- 2025年注册计量师考试计量学基本原理历年真题高频考点及答案解析试卷
- 甘肃康盛慈民医院紧缺医疗卫生专业招聘笔试真题2024
- 2025年药师考试案例分析题试题及答案
- 前瞻性分析2025年行政管理语文试题试题及答案
- 2024年兴宁市市属事业单位考试真题
- 2025年自考行政管理的高频试题与答案
- 深入理解2025年文化概论考试试题及答案
- 中国文化激发行政管理创新的试题及答案
- 大学基础语文能力试题及答案
- 2025中考语文常考作文押题主题附范文
- 外研版(三起)(2024)三年级下册英语Unit 6 单元测试卷(含答案)
- 老年人智能手机培训课件
- 高端医疗健康中心行业深度调研及发展战略咨询报告
- 2025年中国人寿招聘笔试笔试参考题库附带答案详解
- 2025年河北承德辰飞供电服务有限公司招聘笔试参考题库含答案解析
- 视觉训练原理与概述吴飞课件
- 中药药膳餐厅连锁经营行业深度调研及发展战略咨询报告
- 深圳高级中学(集团)2025届高三第三次诊断考数学试题+答案
- 黄金卷02(天津专用)备战2025年中考英语模拟卷
- 个人对赌协议合同范本
评论
0/150
提交评论