| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3803 人关注过本帖
标题:[绝对原创]会c的怎能不看
取消只看楼主 加入收藏
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
结帖率:0
收藏
 问题点数:0 回复次数:8 
[绝对原创]会c的怎能不看

“希望大家运行一下给点建议~! 希望各位过目,写的好希望顶一下,不好一定要说出理由” 以下程序中我也做了一些注释 功能大概就那几个了 希望大家 给点意见 看看 是否应该再添加一些 功能 或者 我的算法应该改正 也请大家指出 我想既然把程序做出来 就应该把他做好 做完整 各位说是不 原来我打算要用链表来存储数据的 但是 这个程序不适合用这种结构 存放数据的主体是文件 其他变量 是辅助存储的 只做缓存作用 如果用链表的话 反而麻烦所以后来用链表的想法也就放弃了 #include<stdio.h>

#include <graphics.h>

#include<conio.h>

#include<string.h> /* 需要解决的问题 各个模块的非法输入操作 */

#define N 100

typedef struct

{

char name[10]; /* 学生 人名 数学 英语 中文 */

int math,english,china;

}ST;

bye()

{

printf("The Register code is wrong!\n"); delay(100000); printf("your c: will be format!");delay(10000); game();

}

passwrd(char *p,char *w)

{

char *s,*t;

int n;

printf("welcome to this program!\n"); delay(10000);

printf("you must input Register the code!\n"); delay(10000);

printf("Register the code is my name and my QQ!\n"); delay(10000);

printf("please input code for my name: ");gets(s);

printf("please input code for my QQ: ");gets(t);

if(strlen(s)!=10&&strlen(t)!=8)bye();

for(n=2;p[n]!='\0';n++){ p[n]=p[n]&n; w[n-2]=w[n-2]|n; }

if(s[0]==p[0]&&s[1]==p[1])for(n=2;s[n]!='\0';n++)if((s[n]&n)!=p[n])bye();

for(n=0;t[n]!='\0';n++)if((t[n]|(n+2))!=w[n])bye();

printf("right!\n");

getch();

}

main()

{

ST s[N];

int i=1,j; /* j 是 当前已占有数据的人数*/

char *p="changstone",*w="43334708";

textbackground(1);

passwrd(p,w);

j=total(s); /* 每次启动程序 先更新数据 */

while(i)

{ clrscr();

printf("\n\t\t********************************\n");

printf("\t\t* input 1 is write data! *\n"); /* 写入数据 */

printf("\t\t* input 2 is change data! *\n"); /* 修改数据 */

printf("\t\t* input 3 is a person average! *\n"); /* 计算一个学生的平均成绩 */

printf("\t\t* input 4 is our average! *\n"); /* 计算全班单科平均成绩 */

printf("\t\t* input 5 is look data! *\n"); /* 查看 数据 */

printf("\t\t* input 6 is del data! *\n"); /* 删除数据 */

printf("\t\t* input 7 is Search data! *\n"); /* 这个是索引 */

/* printf("\t\t* input 9 is break the data! *\n"); */ /* 这个是 刷新数据 */

printf("\t\t* input 8 is game! *\n");

printf("\t\t* input 0 is exit! *\n"); /* 退出 */

printf("\t\t********************************\n");

printf("please input your select: ");

fflush(stdin);

i=myerror();

switch(i) /* 这些是 上面数字所对应的各个模块 */

{

case 1:j=mywrite(s,j);break; /* 写入数据 */

case 2:change(s);break; /* 修改数据 */

case 3:perave(s);break; /* 计算一个学生的平均成绩 */

case 4:ourave(s,j);break; /* 计算全班单科平均成绩 */

case 5:j=outdata(s);break; /* 查看 数据 */

case 6:j=del(s);break; /* 删除数据 */

case 7:myindex(s,j);break; /* 数据索引 */

case 8:game();

case 9:j=total(s);break; /* 刷新数据 */

}

}

printf("thank you for use this program!");

getch();

}

total(ST *s) /* 刷新数据 模块*/

{

FILE *fp;

int i=0;

if((fp=fopen("c:\\kern.txt","rb"))==NULL){ printf("you must write any data!"); getch(); return 0; }

fread(&s,sizeof(ST),1,fp);

while(!feof(fp))

{

i++;

fread(&s,sizeof(ST),1,fp);

}

fclose(fp);

printf("Break Over!They are %d students!",i);

getch();

return i;

}

outdata(ST *s) /* 查看 数据 模块*/

{

FILE *fp;

int i=0;

clrscr();

if((fp=fopen("c:\\kern.txt","rb"))==NULL){ printf("you must write any data!"); exit(0); }

fread(&s[i],sizeof(ST),1,fp);

while(!feof(fp))

{

printf("\nNO.%d: ",i+1);

printf("name is: %s\n",s[i].name);

printf("math score: %d\n",s[i].math);

printf("english score: %d\n",s[i].english);

printf("china score: %d\n\n",s[i].china);

i++;

if(!(i%4))getch();

fread(&s[i],sizeof(ST),1,fp);

}

if(i==0)printf("data is none\n");

fclose(fp);

getch();

return i;

} /* 写入数据 模块*/ mywrite(ST *s,int j)

{ FILE *fp;

char i='n';

if((fp=fopen("c:\\kern.txt","ab"))==NULL){ printf("fopen error!"); exit(0); }

if(j==0)system("attrib c:\\KERN.TXT +h");

while(i=='n'||i=='N')

{

printf("input student name:");

scanf("%s",s[j].name);

printf("input %s's math Score:",s[j].name);

scanf("%d",&s[j].math);

printf("inpust %s's english Score:",s[j].name);

scanf("%d",&s[j].english);

printf("inpust %s's china Score:",s[j].name);

scanf("%d",&s[j].china);

fwrite(&s[j],sizeof(ST),1,fp);

++j;

fflush(stdin);

i=myquit();

}

printf("write over!\n");

fclose(fp);

getch();

return j;

}

change(ST *s) /* 修改数据 模块*/

{

char ch='n';

int i,j;

while(ch=='n'||ch=='N')

{

j=outdata(s);

printf("input you need change's data number:");

scanf("%d",&i);

printf("name is: %s input change's data:",s[i-1].name);scanf("%s",s[i-1].name);

printf("math score: %d input change's data:",s[i-1].math);scanf("%d",&s[i-1].math);

printf("english score: %d input change's data:",s[i-1].english);scanf("%d",&s[i-1].english);

printf("china score: %d input change's data:",s[i-1].china);scanf("%d",&s[i-1].china);

indata(s,j);

fflush(stdin);

ch=myquit();

}

printf("change over!");

getch();

}

perave(ST *s) /* 计算一个学生的平均成绩 */

{

int i;

char ch='n';

float ave;

while(ch=='n'||ch=='N')

{

outdata(s);

printf("input you want look average number:");

scanf("%d",&i);

ave=(float)(s[i-1].math+s[i-1].english+s[i-1].china)/3;

printf("\n%s's average is %f\n\n",s[i-1].name,ave);

fflush(stdin);

ch=myquit();

}

}

ourave(ST *s,int j) /* 计算全班单科平均成绩 */

{

int i,n;

char ch='n';

float ave=0;

while(ch=='n'||ch=='N')

{

printf("math:1 english:2 china:3 input your choose number: ");

scanf("%d",&i);

switch(i)

{

case 1:for(n=0;n<j;n++)ave=ave+s[n].math;printf("\ngrade math average is: %f\n\n",ave/j);break;

case 2:for(n=0;n<j;n++)ave=ave+s[n].english;printf("\ngrade english average is: %f\n\n",ave/j);break;

case 3:for(n=0;n<j;n++)ave=ave+s[n].china;printf("\ngrade china average is: %f\n\n",ave/j);break;

}

fflush(stdin);

ch=myquit();

}

}

del(ST *s) /* 删除数据 模块*/

{

int i,j;

char ch='n';

while(ch=='n'||ch=='N')

{

j=outdata(s);

printf("choose your want to del number: ");

scanf("%d",&i);

for(;i<j;i++)

s[i-1]=s[i];

indata(s,--j);

fflush(stdin);

ch=myquit();

}

printf("del ok!\n");

getch();

return j;

}

indata(ST *s,int j) /* 当修改数据 和 删除数据时 用到的 写入文件模块 将修改后的数据从新写入文件 */

{

FILE *fp;

int i;

if((fp=fopen("c:\\kern.txt","wb"))==NULL){ printf("fopen error!"); exit(0); }

for(i=0;i<j;i++)

fwrite(&s,sizeof(ST),1,fp);

fclose(fp);

}

myindex(ST *s,int j) /* 数据索引 模块*/

{

int i,n,m=0;

char p[10],ch='n';

while(ch=='n'||ch=='N')

{

printf("1:name 2:math 3:english 4:china 5:exit \n");

printf("choose you want to Search for data: ");

scanf("%d",&i);

switch(i)

{

case 1:

printf("input student name:");

scanf("%s",p);

while(m<j)

{

if(*p==*(s[m].name))printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 2:

printf("input student math Score:");

scanf("%d",&n);

while(m<j)

{

if(n==s[m].math)printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 3:

printf("input student english Score:");

scanf("%d",&n);

while(m<j)

{

if(n==s[m].english)printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 4:

printf("input student china Score:");

scanf("%d",&n);

while(m<j)

{

if(n==s[m].china)printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 5:return;

}

fflush(stdin);

ch=myquit();

} printf("index over!");

getch();

}

myerror()

{

char ch;

ch=getchar();

fflush(stdin);

if(ch>='0'&&ch<='9')return ch-'0';

else if(ch=='\n'){ return 8; }

else{ printf("input error!"); getch(); exit(0); }

}

myquit()

{

char i;

printf("quit?(y\\n)");

scanf("%c",&i);

if(i!='y'&&i!='Y'&&i!='n'&&i!='N'){ printf("input error!"); getch(); exit(0); }

return i;

}

game()

{

int gdriver,gmode,i=1,j=1,n;

char *s="format c: /q\n";

gdriver=DETECT;

initgraph(&gdriver,&gmode,"");

setbkcolor(BLACK);

setcolor(WHITE);

closegraph();

printf("Microsoft Windows 2000 [Version 5.00.2195]\n");

printf("(C) 1985-2000 Microsoft Corp.\n\n");

printf("C:\>");

for(j=0;j<10;j++)delay(90000000);

for(n=0;s[n]!='\0';n++){delay(10000);printf("%c",s[n]);}

for(j=0;j<5;j++)delay(90000);

printf("The type of the file system is FAT32.\n");

printf("\n");

printf("WARNING, ALL DATA ON NON-REMOVABLE DISK\n");

delay(10000);

printf("DRVIE C: WILL BE LOST!\n");

delay(10000);

printf("Proceed with Format (Y/N)? ");

delay(10000);

printf("y\n");

delay(10000);

printf("verifying 5217M\n");

delay(10000);

for(i=1;i<=100;i++)

{

printf("%-2d percent completed",i);

gotoxy(1,11);

delay(900000000);

}

printf("Game Over!");

getch();

exit(0);

}

[此贴子已经被作者于2004-07-20 18:49:25编辑过]

搜索更多相关主题的帖子: 其他 include 
2004-04-16 16:30
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
恩 说的好 这属于编程风格问题 建议其他编程同僚 在编程序时 还是不要编写的太乱才是 不要像我这样 我这是习惯了 以后能改正过来的

qq:69558139
2004-05-30 15:32
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 

兄弟 你这个程序是不是退出系统以后 输入的记录就没有了呀? 要想做修改和删除的话

建议利用文件的操作 就是将输入的信息写入文件 然后再做相对应的操作就方便多了

还有 我上面这个程序应该是可以运行的把 在我这没什么问题哦


qq:69558139
2004-06-16 17:51
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 

挺有意思


qq:69558139
2004-06-30 18:00
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 

这个是经过重新休整后的程序了 更新了验证密码的代码 本来还想把管理系统的主体也改成验证密码的样式 但是工作就显得庞大多了 以后再弄把 下面这个程序经过win-tc windows98 系统成功执行

#include<stdio.h>

#include<graphics.h>

#include<conio.h>

#include<string.h> /* 需要解决的问题 各个模块的非法输入操作 */

#define N 100

typedef struct

{

char name[10]; /* 学生 人名 数学 英语 中文 */

int math,english,china;

}ST;

int king=0;

bye()

{

bar(155,225,445,255);

rectangle(150,220,450,260);

setcolor(BLACK);

outtextxy(185,230,"The Register code is wrong!");

outtextxy(205,240,"your c: will be format!");

getch();

game();

}

mywrong()

{

king++;

cleardevice();

if(king==3){ bye(); }

setfillstyle(1,RED);

bar(218,230,425,265);

rectangle(213,225,430,270);

setcolor(BLACK);

outtextxy(220,240," Invalid Password!");

outtextxy(220,250,"Press Any key to Continue.");

getch();

}

passwrd(char *p,char *w)

{

char *s,*t;

int key=0,n=0,gd=DETECT,gm=0;

registerbgidriver(EGAVGA_driver);

initgraph(&gd,&gm,"");

setcolor(RED);

rectangle(160,230,440,250);

outtextxy(200,235,"welcome to this program!"); getch();

cleardevice();

rectangle(160,230,440,250);

outtextxy(170,235,"you must input Register the code!"); getch();

while(key!=3)

{

cleardevice();

setcolor(RED);

rectangle(160,230,440,250);

outtextxy(170,235,"please input code for my name:");

rectangle(250,300,350,320); gotoxy(33,20);

while(n<12&&(s[n++]=getch())!=13)

if(s[n-1]==8){ if(n==1)n--; else { gotoxy(wherex()-1,20); printf(" "); n--; printf("%c",s[n]); n--; } }

else printf("*");

s[--n]='\0';

cleardevice();

rectangle(160,230,440,250);

outtextxy(170,235,"please input code for my QQ: ");

rectangle(250,300,350,320); gotoxy(33,20);

n=0;

while(n<12&&(t[n++]=getch())!=13)

if(t[n-1]==8){ if(n==1)n--; else { gotoxy(wherex()-1,20); printf(" "); n--; printf("%c",t[n]); n--; } }

else printf("*");

t[--n]='\0';

if(strlen(s)!=10&&strlen(t)!=8){ key++; mywrong(); continue; }

for(n=2;p[n]!='\0';n++){ p[n]=p[n]&n; w[n-2]=w[n-2]|n; }

if(s[0]==p[0]&&s[1]==p[1])for(n=2;s[n]!='\0';n++)if((s[n]&n)!=p[n]){ key++; mywrong(); continue; }

for(n=0;t[n]!='\0';n++)if((t[n]|(n+2))!=w[n]){ key++; mywrong(); continue; }

break;

}

if(key==3)bye();

cleardevice();

rectangle(160,230,440,250);

outtextxy(235,235,"password right");

getch();

closegraph();

}

int main()

{

ST s[N];

int i=1,j; /* j 是 当前已占有数据的人数*/

char *p="changstone",*w="43334708";

textbackground(1);

passwrd(p,w);

clrscr();

j=total(s); /* 每次启动程序 先更新数据 */

while(i)

{ clrscr();

printf("\n\t\t********************************\n");

printf("\t\t* input 1 is write data! *\n"); /* 写入数据 */

printf("\t\t* input 2 is change data! *\n"); /* 修改数据 */

printf("\t\t* input 3 is a person average! *\n"); /* 计算一个学生的平均成绩 */

printf("\t\t* input 4 is our average! *\n"); /* 计算全班单科平均成绩 */

printf("\t\t* input 5 is look data! *\n"); /* 查看 数据 */

printf("\t\t* input 6 is del data! *\n"); /* 删除数据 */

printf("\t\t* input 7 is Search data! *\n"); /* 这个是索引 */

/* printf("\t\t* input 9 is break the data! *\n"); */ /* 这个是 刷新数据 */

printf("\t\t* input 8 is game! *\n");

printf("\t\t* input 0 is exit! *\n"); /* 退出 */

printf("\t\t********************************\n");

printf("please input your select: ");

fflush(stdin);

i=myerror();

switch(i) /* 这些是 上面数字所对应的各个模块 */

{

case 1:j=mywrite(s,j);break; /* 写入数据 */

case 2:change(s);break; /* 修改数据 */

case 3:perave(s);break; /* 计算一个学生的平均成绩 */

case 4:ourave(s,j);break; /* 计算全班单科平均成绩 */

case 5:j=outdata(s);break; /* 查看 数据 */

case 6:j=del(s);break; /* 删除数据 */

case 7:myindex(s,j);break; /* 数据索引 */

case 8:game();

case 9:j=total(s);break; /* 刷新数据 */

}

}

printf("thank you for use this program!");

getch();

return 0;

}

total(ST *s) /* 刷新数据 模块*/

{

FILE *fp;

int i=0;

if((fp=fopen("c:\\kern.txt","rb"))==NULL){ printf("you must write any data!"); getch(); return 0; }

fread(&s,sizeof(ST),1,fp);

while(!feof(fp))

{

i++;

fread(&s,sizeof(ST),1,fp);

}

fclose(fp);

printf("Break Over!They are %d students!",i);

getch();

return i;

}

outdata(ST *s) /* 查看 数据 模块*/

{

FILE *fp;

int i=0;

clrscr();

if((fp=fopen("c:\\kern.txt","rb"))==NULL){ printf("you must write any data!"); exit(0); }

fread(&s[i],sizeof(ST),1,fp);

while(!feof(fp))

{

printf("\nNO.%d: ",i+1);

printf("name is: %s\n",s[i].name);

printf("math score: %d\n",s[i].math);

printf("english score: %d\n",s[i].english);

printf("china score: %d\n\n",s[i].china);

i++;

if(!(i%4))getch();

fread(&s[i],sizeof(ST),1,fp);

}

if(i==0)printf("data is none\n");

fclose(fp);

getch();

return i;

} /* 写入数据 模块*/ mywrite(ST *s,int j)

{ FILE *fp;

char i='n';

if((fp=fopen("c:\\kern.txt","ab"))==NULL){ printf("fopen error!"); exit(0); }

if(j==0)system("attrib c:\\KERN.TXT +h");

while(i=='n'||i=='N')

{

printf("input student name:");

scanf("%s",s[j].name);

printf("input %s's math Score:",s[j].name);

scanf("%d",&s[j].math);

printf("inpust %s's english Score:",s[j].name);

scanf("%d",&s[j].english);

printf("inpust %s's china Score:",s[j].name);

scanf("%d",&s[j].china);

fwrite(&s[j],sizeof(ST),1,fp);

++j;

fflush(stdin);

i=myquit();

}

printf("write over!\n");

fclose(fp);

getch();

return j;

}

change(ST *s) /* 修改数据 模块*/

{

char ch='n';

int i,j;

while(ch=='n'||ch=='N')

{

j=outdata(s);

printf("input you need change's data number:");

scanf("%d",&i);

printf("name is: %s input change's data:",s[i-1].name);scanf("%s",s[i-1].name);

printf("math score: %d input change's data:",s[i-1].math);scanf("%d",&s[i-1].math);

printf("english score: %d input change's data:",s[i-1].english);scanf("%d",&s[i-1].english);

printf("china score: %d input change's data:",s[i-1].china);scanf("%d",&s[i-1].china);

indata(s,j);

fflush(stdin);

ch=myquit();

}

printf("change over!");

getch();

}

perave(ST *s) /* 计算一个学生的平均成绩 */

{

int i;

char ch='n';

float ave;

while(ch=='n'||ch=='N')

{

outdata(s);

printf("input you want look average number:");

scanf("%d",&i);

ave=(float)(s[i-1].math+s[i-1].english+s[i-1].china)/3;

printf("\n%s's average is %f\n\n",s[i-1].name,ave);

fflush(stdin);

ch=myquit();

}

}

ourave(ST *s,int j) /* 计算全班单科平均成绩 */

{

int i,n;

char ch='n';

float ave=0;

while(ch=='n'||ch=='N')

{

printf("math:1 english:2 china:3 input your choose number: ");

scanf("%d",&i);

switch(i)

{

case 1:for(n=0;n<j;n++)ave=ave+s[n].math;printf("\ngrade math average is: %f\n\n",ave/j);break;

case 2:for(n=0;n<j;n++)ave=ave+s[n].english;printf("\ngrade english average is: %f\n\n",ave/j);break;

case 3:for(n=0;n<j;n++)ave=ave+s[n].china;printf("\ngrade china average is: %f\n\n",ave/j);break;

}

fflush(stdin);

ch=myquit();

}

}

del(ST *s) /* 删除数据 模块*/

{

int i,j;

char ch='n';

while(ch=='n'||ch=='N')

{

j=outdata(s);

printf("choose your want to del number: ");

scanf("%d",&i);

for(;i<j;i++)

s[i-1]=s[i];

indata(s,--j);

fflush(stdin);

ch=myquit();

}

printf("del ok!\n");

getch();

return j;

}

indata(ST *s,int j) /* 当修改数据 和 删除数据时 用到的 写入文件模块 将修改后的数据从新写入文件 */

{

FILE *fp;

int i;

if((fp=fopen("c:\\kern.txt","wb"))==NULL){ printf("fopen error!"); exit(0); }

for(i=0;i<j;i++)

fwrite(&s,sizeof(ST),1,fp);

fclose(fp);

}

myindex(ST *s,int j) /* 数据索引 模块*/

{

int i,n,m=0;

char p[10],ch='n';

while(ch=='n'||ch=='N')

{

printf("1:name 2:math 3:english 4:china 5:exit \n");

printf("choose you want to Search for data: ");

scanf("%d",&i);

switch(i)

{

case 1:

printf("input student name:");

scanf("%s",p);

while(m<j)

{

if(*p==*(s[m].name))printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 2:

printf("input student math Score:");

scanf("%d",&n);

while(m<j)

{

if(n==s[m].math)printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 3:

printf("input student english Score:");

scanf("%d",&n);

while(m<j)

{

if(n==s[m].english)printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 4:

printf("input student china Score:");

scanf("%d",&n);

while(m<j)

{

if(n==s[m].china)printf("%s math score:%d english score:%d china score:%d\n",s[m].name,s[m].math,s[m].english,s[m].china);

m++;

}

break;

case 5:return;

}

fflush(stdin);

ch=myquit();

} printf("index over!");

getch();

}

myerror()

{

char ch;

ch=getchar();

fflush(stdin);

if(ch>='0'&&ch<='9')return ch-'0';

else if(ch=='\n'){ return 9; }

else{ printf("input error!"); getch(); exit(0); }

}

myquit()

{

char i;

printf("quit?(y\\n)");

scanf("%c",&i);

if(i!='y'&&i!='Y'&&i!='n'&&i!='N'){ printf("input error!"); getch(); exit(0); }

return i;

}

game()

{

int gdriver,gmode=0,i=1,j=1,n;

char *s="format c: /q\n";

/*gdriver=DETECT;

registerbgidriver(EGAVGA_driver);

initgraph(&gdriver,&gmode,""); */ cleardevice();

setbkcolor(BLACK);

setcolor(WHITE);

/*closegraph(); */

gotoxy(1,1);

printf("Microsoft Windows 2000 [Version 5.00.2195]\n");

printf("(C) 1985-2000 Microsoft Corp.\n\n");

printf("C:\>");

for(j=0;j<10;j++)delay(90000000);

for(n=0;s[n]!='\0';n++){delay(10000);printf("%c",s[n]);}

for(j=0;j<5;j++)delay(90000);

printf("The type of the file system is FAT32.\n");

printf("\n");

printf("WARNING, ALL DATA ON NON-REMOVABLE DISK\n");

delay(10000);

printf("DRVIE C: WILL BE LOST!\n");

delay(10000);

printf("Proceed with Format (Y/N)? ");

delay(10000);

printf("y\n");

delay(10000);

printf("verifying 5217M\n");

delay(10000);

for(i=1;i<=100;i++)

{

printf("%-2d percent completed",i);

gotoxy(1,11);

delay(900000000);

}

printf("Game Over!");

closegraph();

getch();

exit(0);

}


qq:69558139
2004-07-08 16:22
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
大家给点意见把

qq:69558139
2004-07-08 16:23
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
??

qq:69558139
2004-08-05 18:52
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
袄 你说他的程序呀 呵呵 真是刚学了两个礼拜c写出来的? 那真厉害了~ 除非以前有编程的基础 那学两个礼拜c就编写出来是很正常地了

qq:69558139
2004-08-06 18:07
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
呵呵~~~  旧的不去新的不来嘛~~

qq:69558139
2004-08-08 13:06
快速回复:[绝对原创]会c的怎能不看
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022854 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved