| Nan 的个人资料心理溃疡照片日志列表 | 帮助 |
心理溃疡白色的,白色的,白色的无法愈合 6月24日 好长时间没写了哦,来个季度总结……经过漫长的等待,瑞典方面在五月中旬终于有了消息,皇家理工的分布式系统软件工程录取。瑞典人这个一拖再拖的办事作风这次领略到了……无语啊。
拿到ad就直接去签证了,到了大使馆门口一看……我滴娘啊……人不是一般的多啊,我八点半到达,十二点半才被放了进去……无奈啊。
毕业设计还算顺利,虽然程序没怎么写,但是论文倒是仔细认真写的,结果被老师发了同组同学一人一份,结果,所有人的论文都跟我的一样……再次无语啊。
现在和亲关系很好,不是一般好,开始担心走了以后受不受的了……再次无奈啊 3月10日 公布代码,需要的拿去用帮别人做的作业,代码不长,冗余度高,而且幼稚,不到500行,不符合软件工程要求,面向过程,字符界面,没有注释,需要的拿去
传说中的白痴同学录,插入,删除,修改,查询,排序,保存,读取,模块划分清楚,随便改改就变成别的了。
#include<string.h>
#include<stdlib.h> #include<conio.h> #include<stdio.h> void newm(); void open(); void ins(); typedef struct SS S; struct SS { long number; char address[50]; char name[20]; long zipCode; long tel; char email[50]; S *next; }; int built=0;
S h; S *p=&h; S *q; int check(S *c) { S *qo; for(qo=&h;qo!=c;qo=qo->next) { if(qo->number==c->number) { system("cls"); printf("Already have the same IDNumber.\n"); return (0); } } return (1); } void show2(S *c)
{ printf("ID Number:%d \n",c->number); printf("Name:%s \n",c->name); printf("Address:%s\n",c->address); printf("ZipCode:%d \n",c->zipCode); printf("Tel:%d \n",c->tel); printf("E-mail:%s\n",c->email); } void ins() { int t; q =(S *)malloc(sizeof(S)); p->next=q; printf("Please input IDNumber:"); scanf("%ld",&q->number); printf("Please input Name:"); scanf("%s",q->name); printf("Please input Address:"); scanf("%s",q->address); printf("Please input ZipCode:"); scanf("%ld",&q->zipCode); printf("Please input Tel:"); scanf("%ld",&q->tel); printf("Please input E-mail:"); scanf("%s",q->email); t=check(q); if(t==0) {free( q);ins();} { p=q; system("cls"); } } void newm()
{ char abs; int t; int n; p=&h; for(;;) { q = (S *)malloc(sizeof(S)); p->next=q; printf("Please input IDNumber:"); scanf("%ld",&q->number); printf("Please input Name:"); scanf("%s",q->name); printf("Please input Address:"); scanf("%s",q->address); printf("Please input ZipCode:"); scanf("%ld",&q->zipCode); printf("Please input Tel:"); scanf("%ld",&q->tel); printf("Please input E-mail:"); scanf("%s",q->email); t=check(q); if(t==0) { free((void *) q); continue; } else { p=q; for(n=0;n!=1;) { built=1; system("cls"); printf("Continue? Y/N"); scanf("%c",&abs); switch(abs) { case 'n':{system("cls"); return;} case 'N':{system("cls"); return;} case 'y':{system("cls"); n=1;} case 'Y':{system("cls"); n=1;} } } } } } void mod() { int num; char a; int n; if(p==&h) { printf("No record, press any key to return."); getch(); return; } for(q=&h;q!=p;q=q->next) show2(q->next); for(;;) { printf("Please input IDNumber:"); scanf("%d",&num); q=&h; while(q!=p) { if(q->next->number==num) { printf("a"); scanf("%s",q->next->name); printf("b"); scanf("%s",q->next->address); printf("c"); scanf("%d",&q->next->zipCode); printf("d"); scanf("%d",&q->next->tel); printf("e"); scanf("%s",q->next->email); return; } q=q->next; } for(n=0;n!=1;) { system("cls"); printf("The student is not exist. y:continue n:back to main menu"); scanf("%c",&a); switch(a) { case 'n':{system("cls"); return;} case 'N':{system("cls"); return;} case 'y':{system("cls"); n=1;} case 'Y':{system("cls"); n=1;} } } } } void del() { int num; char a; int n; if(p==&h) { printf("No record, press any key to return."); getch(); return; } for(q=&h;q!=p;q=q->next)
show2(q->next); for(;;) { printf("Please input IDNumber:"); scanf("%d",&num); q=&h; while(q!=p) { if(q->next->number==num) { printf("Do you want to delete this student? y: yes n: no"); scanf("%c",&a); if(a=='y') { if(q->next==p) p=q; q->next=q->next->next; return; } else return; } q=q->next; } for(n=0;n!=1;) { system("cls"); printf("The student is not exist. y:continue n:back to main menu"); scanf("%c",&a); switch(a) { case 'n':{system("cls"); return;} case 'N':{system("cls"); return;} case 'y':{system("cls"); n=1;} case 'Y':{system("cls"); n=1;} } } } } void sort() { S *s; int tag; long min=-1; long minp=100000000; if(p==&h) { printf("No record, press any key to return."); getch(); return; } system("cls"); for(;;) { tag=0; for(q=&h;q!=p;) { if(q->next->number>min&&q->next->number<minp) { minp=q->next->number; s=q->next; tag=1; } q=q->next; } if(tag==1) { show2(s); min=minp; minp=100000000; continue; } break; } getch(); } void ByNumber() { int num; int n; char a; if(p==&h) { printf("No record, press any key to return."); getch(); return; } for(;;) { printf("Please input IDNumber:"); scanf("%d",&num); q=&h; while(q!=p) { if(q->next->number==num) { show2(q->next); getch(); return; } q=q->next; } for(n=0;n!=1;) { system("cls"); printf("The student is not exist. y:continue n:back to main menu"); scanf("%c",&a); switch(a) { case 'n':{system("cls"); return;} case 'N':{system("cls"); return;} case 'y':{system("cls"); n=1;} case 'Y':{system("cls"); n=1;} } } } } void ByName() { char name[20]; char a; int n; if(p==&h) { printf("No record, press any key to return."); getch(); return; } for(;;) { printf("Please input name:"); scanf("%s",name); q=&h; while(q!=p) { if(!strcmp(q->next->name,name)) { show2(q->next); getch(); return; } q=q->next; } for(n=0;n!=1;) { system("cls"); printf("The student is not exist. y:continue n:back to main menu"); scanf("%c",&a); switch(a) { case 'n':{system("cls"); return;} case 'N':{system("cls"); return;} case 'y':{system("cls"); n=1;} case 'Y':{system("cls"); n=1;} } } } } void qu() { char input; for(;;) { system("cls"); printf("|---------------------------------------------| \n"); printf("| Query | \n"); printf("|---------------------------------------------| \n"); printf("| 0----By IDNumber | \n"); printf("| 1----By Name | \n"); printf("| 2----Return | \n"); printf("|---------------------------------------------| \n"); input=getch(); switch(input) { case '0': system("cls"); ByNumber();break; case '1': system("cls"); ByName();break; case '2': return; } } } void save()
{ char *filename; FILE *fp; filename=malloc(20*sizeof(char)); if(p==&h) { printf("No record, press any key to return."); getch(); return; } q=&h; printf("Please input the filename:"); scanf("%s",filename); fp=fopen(filename,"w"); for(q=&h;q!=p;) { fwrite(q->next,sizeof(S),1,fp); q=q->next; } fclose(fp); } void load() { char *filename; FILE *fp; filename=malloc(20*sizeof(char)); q=&h; printf("Please input the filename:"); scanf("%s",filename); if((fp=fopen(filename,"r"))==NULL) { printf("error"); getch(); return; } for(p=&h;;) { fgetc(fp); if (feof(fp)) break; fseek(fp,-1L,1); q=(S *)malloc(sizeof(S)); fread(q,sizeof(S),1,fp); p->next=q; p=q; } built=1; fclose(fp); } void open() { char start; for(;;) { system("cls"); printf("|---------------------------------------------|\n"); printf("| MAIN MENU |\n"); printf("|---- ------- --------------------------------|\n"); printf("| A----New |\n"); printf("| B----Insert |\n"); printf("| C----Modify |\n"); printf("| D----Delete |\n"); printf("| E----Sort |\n"); printf("| F----Query |\n"); printf("| S----Save |\n"); printf("| L----Load |\n"); printf("| Q----Quit |\n"); printf("|---------------------------------------------|\n"); start=getch(); if(built==1) { switch(start) { case 'a': system("cls"); newm();break; case 'A': system("cls"); newm();break; case 'b': system("cls"); ins();break; case 'B': system("cls"); ins();break; case 'c': system("cls"); mod();break; case 'C': system("cls"); mod();break; case 'd': system("cls"); del();break; case 'D': system("cls"); del();break; case 'e': system("cls"); sort();break; case 'E': system("cls"); sort();break; case 'f': system("cls"); qu();break; case 'F': system("cls"); qu();break; case 's': system("cls"); save();break; case 'S': system("cls"); save();break; case 'l': system("cls"); load();break; case 'L': system("cls"); load();break; case 'q': exit(0); case 'Q': exit(0); } } else{ switch(start) { case 'a': system("cls"); newm();break; case 'A': system("cls"); newm();break; case 'l': system("cls"); load();break; case 'L': system("cls"); load();break; default: system("cls");printf("Please New or Load first");start=getch(); } } } } void main()
{ open(); } 1月8日 迟到的年终总结突然间发现已经冷落了这个地方很久了,最近发生的事情着实的不少,今天决定写一写
先说该说的,董华伟又跑了回来,大冬天的不在美国老实呆着……又是原来那一帮一伙的跑到了全聚德吃烤鸭,6个人要了两只……本来我估计没问题的,后来居然还剩了,唉,浪费啊
河北省教育厅的官员们一定是没有基督信仰的,不然怎么会赶着圣诞节来做什么天杀的教学检查啊?河北工大的领导们如临大敌,勒令检查期间所有学生不得离开学校,这种状态要保持一周,而且周二就是圣诞节,我为什么要为了这帮吃饱了撑得没事干的人损失一个圣诞节啊?所谓上有政策下有对策,凭我的聪明才智怎么能让检查团困住?我随便在家门口找了个小医院开了5天的病假条……这下你拿我没辙了吧~~~~~~·2007年12月24日,坐着车离开学校途中,看见一大排车头有四个圈圈的黑色小车缓缓驶过校区,这个马戏团还很讲排场嘛
平安夜理所当然的跑去教堂……人这个多啊。为什么中国这么多人平安夜排长队就是为了看教堂一眼啊?身为教友我当然可以进去坐下,等待子时弥撒,没什么特别的,不多说了。
圣诞节,白天忘记了做了什么,晚上和小白去参加了一个“广告茶话会”,她居然告诉我带游泳衣可以游泳………………结果根本没这么回事,幸亏我没带,不然就裘糗大了。收到了小白的圣诞礼物,是什么呢?秘密
圣诞之后当然是元旦啊……这一天……惊天地泣鬼神啊……不该说的不说
然后就是N门开卷考试,简直是变态之极,每一门都是马不停蹄的抄,最后将将能够抄完,我手上的功夫在考完试以后暴增
闭卷的考试倒是很照顾人,但是居然考了很多不再范围里的,无语了,这个老师怎么当的
今天考完了最后一门,大学的学习结束,呵呵
先写这些,以后想起来再说 12月26日 南开大学平安夜砸车事件南开别克门事件经过: 1、一辆别克车在学活前面与一辆自行车相刮,具体原因未知 16、砸车之时,千人齐唱校歌:“渤海之滨,南开之津,巍巍我南开精神……”
(以下内容转自某南开学子博客) 据说,有一个男老师想解说此家人是学校某领导的亲戚,话没说完就被学生用砖头从车上砸下来了;
(博客2) 很多人见过现场,也知道在人群看起来还不那么可怕的时候,车主的态度是多么恶心。刚才作了一些交谈和调查,核心的事实大概都知道了。
|
在一切未有之前
|
||||||||||
|
|