i)\r(print" /> i)\r(print" />

全文预览

C语言内存管理及经典算法

上传者:梦溪 |  格式:pdf  |  页数:77 |  大小:7029KB

文档介绍
toplayor'n')\n");\rloop:\rwhile((c=getchar())==,y,)\r{\ri=rand()0;\rprintf("\npleaseinputnumberyouguess:\n");\rstart=clock();\ra=time(NULL);\rscanf(H%d",&guess);\rwhile(guess!=i)\r{if(guess>i)\r(printf("pleaseinputalittlesmaller.\n");\rscanf("%d",&guess);}\relse\r{printf("pleaseinputalittlebigger.Xn");\rscanf("%dn,&guess);)\r)\rendclock?\rb=tiine(NULL);\rprintf(H\l:Ittookyou%6.3fseconds\n",var=(double)(end-start)/18.2);\rprintf("\l:ittookyou%6.3fseconds\n\n",difftime(b,a));\rif(var<15)\rprintf("\l\lYouarcveryclever!\l\l\n\n");\relseif(var<25)\rprintf("\l\lyouarenormal!\l\i\n\n");\relse\rprintf("\l\lyouarestupid!\l\l\n\n");\rprintf(M\l\lCongradulations\l\l\n\nu);\rprintf("Thenumberyouguessis%d",i);\r)\rprintf("\ndoyouwanttotryitagain?(\"yy\".or.\"n\")\n");\rif((c=getch())=='y*)\rgotoloop;

收藏

分享

举报
下载此文档