第一次作业

一.程序
void main() { int i=0; seefirst(i); i=cmd(i); if(i==99) { printf("Thank You!bye~\n"); }} void seefirst(){ printf("Microsoft Window [版本 6.1.7601]\n"); printf("版权所有 <c> 2009 Microsoft corporation。"); printf("保留所有权。\n"); printf("\n"); printf("E:\>"); } int cmd() { char ch[N]; int i=0; do{ for(i=0;i<N;i++) { gets(ch[i]); if((ch[i]<='a')||(ch[i]>='z'))break; } if(ch=="dir"){dir();} else if(ch=="cd"){cd();} else if(ch=="md"){md();} else if(ch=="cls"){cls();} else if(ch=="date"){date();} else if(ch=="time"){time();} else if(ch=="ren"){ren();} else if(ch=="copy"){copy();} else printf("warning!\n"); }while(ch=='quit'); return 99; }
二.运行结果

三.

三.心得体会
第一次写网上实验手册有点乱,所以比较迟交,写作业过程中也出现了一点小问题,经多次反复修改后得到改善。有了这次经历,下次必能很快滴完成并提交作业。
posted @ 2015-04-09 08:42  44周博为  阅读(119)  评论(0编辑  收藏  举报