您好,欢迎访问三七文档
当前位置:首页 > 财经/贸易 > 资产评估/会计 > c++苍半仙算命代码
#includeiostream#includestring#includefstream#includewindows.h#includestdlib.h#includetime.husingnamespacestd;stringaa,xm,nl,chusheng,d,y;//¶¨ÒåÁ˼¸¸öÈ«¾Ö±äÁ¿£¨ÓдóÓô¦£©voidxinxi(){ifstreamin(Å®ÉúÐÅÏ¢.txt,ios::in);inxmnlchusheng;if(xm==ÁÖÖ¾Áá)in.close();else{ofstreamout(Å®ÉúÐÅÏ¢.txt,ios::out|ios::app);if(out.fail()){coutopenerror;exit(-1);}else{outÁÖÖ¾Áá\tÄêÁä:38\t³öÉúÄêÔÂ:1974-11-29\tendl;outÊ泩\tÄêÁä:26\t³öÉúÄêÔÂ:1987-12-01\tendl;outÁõÒà·Æ\tÄêÁä:26\t³öÉúÄêÔÂ:1987-08-25\tendl;out²ÌÒÀÁÖ\tÄêÁä:32\t³öÉúÄêÔÂ:1980-09-15\tendl;out²Ì׿åû\tÄêÁä:30\t³öÉúÄêÔÂ:1982-11-22\tendl;outÑîÃÝ\tÄêÁä:27\t³öÉúÄêÔÂ:1986-09-12\tendl;out֣ˬ\tÄêÁä:22\t³öÉúÄêÔÂ:1991-08-22\tendl;outÓ¦²É¶ù\tÄêÁä:31\t³öÉúÄêÔÂ:1983-06-20\tendl;out»ÆÊ¥ÒÀ\tÄêÁä:31\t³öÉúÄêÔÂ:1983-02-11\tendl;out.close();}}ifstreamsxl(ÄÐÉúÐÅÏ¢.txt,ios::in);sxlxmnlchusheng;if(xm==ÖܽÜÂ×)sxl.close();else{ofstreamou(ÄÐÉúÐÅÏ¢.txt,ios::out|ios::app);if(ou.fail()){coutopenerror;exit(-1);}else{ouÖܽÜÂ×\tÄêÁä:34\t³öÉúÄêÔÂ:1979-01-18\tendl;ouÁõì¿\tÄêÁä:25\t³öÉúÄêÔÂ:1988-12-06\tendl;ouκ³¿\tÄêÁä:27\t³öÉúÄêÔÂ:1986-02-22\tendl;ouºúÏÄ\tÄêÁä:23\t³öÉúÄêÔÂ:1990-03-01\tendl;ouºú¸è\tÄêÁä:31\t³öÉúÄêÔÂ:1982-09-20\tendl;ou»ÆÏþÃ÷\tÄêÁä:36\t³öÉúÄêÔÂ:1977-11-13\tendl;ouÐìÁ¼\tÄêÁä:26\t³öÉúÄêÔÂ:1987-02-08\tendl;ouÐíáÔ\tÄêÁä:27\t³öÉúÄêÔÂ:1986-05-14\tendl;ouº«¸ý\tÄêÁä:29\t³öÉúÄêÔÂ:1984-02-09\tendl;ou.close();}}}voidkaishi(){coutendl;coutendl;coutendl;cout******************************************************endl;cout**endl;cout**endl;cout*²Ô°ëÏÉËãÃü*endl;cout**endl;cout*1¡¢²âÒöÔµ*endl;cout**endl;cout*2¡¢²â·ÊÅÖ*endl;cout**endl;cout*3¡¢Ëã²ÆÔË*endl;cout**endl;cout*4¡¢Í˳öϵͳ*endl;cout**endl;cout**endl;cout******************************************************endl;coutÇëÑ¡ÔñʹÓù¦ÄÜ£º;}voidjieshu(){system(colorB5);coutendlendlendl;cout************************************************************\n;cout-²Ô°ëÏÉËãÃü-\n;cout--\n;cout-Email:caonima@438.com-\n;cout--\n;cout-QQ:807482734-\n;cout--\n;cout-°æȨËùÓÐ,ÇÖȨÕ߱شͷï½ãÒ»¸ö-\n;cout--\n;cout-×Éѯµç»°£º18306420576-\n;cout--\n;cout************************************************************\n;}voidnv(){while(1){up:system(cls);cout¡·¡·¡·¡·ÇëÑ¡ÔñÄúÏëÒªµÄÃÀÅ®±àºÅ¡¶¡¶¡¶¡¶\n;coutendl;cout1.ÁÖÖ¾Áá;cout2.Ê泩;cout3.ÁõÒà·Æ;cout4.²ÌÒÀÁÖ;cout5.²Ì׿åû;coutendl;cout6.ÑîÃÝ;cout7.֣ˬ;cout8.Ó¦²É¶ù;cout9.»ÆÊ¥ÒÀ;coutendl;stringy;ciny;if(y==1)//Ñ¡ÔñµÄÊÇÁÖÖ¾Áá{ifstreamin(Å®ÉúÐÅÏ¢.txt,ios::in);while(!in.eof()){inxmnlchusheng;if(xm==ÁÖÖ¾Áá){cout»ù±¾ÐÅϢΪ£º;coutxmnlchushengendl;in.close();break;}}coutÊÇ·ñÑ¡ÔñÁ˽â´ËÈ˵ĸü¶àÐÅÏ¢£¿1.ÊÇ2.·ñ\n;u:stringe;cine;if(e==1){cout¸ü¶àÐÅϢΪ£ºendl;coutÌåÖØ£º52kgÉí¸ß£º174cm±ÏÒµÓÚÃÀ¹ú¶àÂ׶à´óѧ£¬±ê×¼µÄ²ÅÅ®¡£\n³öÉúÓŲ́Í壬ÊÇ̨ÍåµÄ³¬¼¶ÃûÄ£¡£2003Ä굱ѡ̨ÍåµÚÒ»ÃÀÅ®;coutendl;}elseif(e!=1&&e!=2){cout¶Ô²»Æð£¬ÄãÊäÈëµÄÓÐÎó£¬ÇëÖØÐÂÊäÈë¡£endl;gotou;}else{}coutÄúÑ¡ÔñµÄÊÇ£ºÁÖÖ¾Áá\n;cout²Ô°ëÏÉÔ»£ºÀÏÐÖ£¬Äã¹ûÈ»ÊÇÖØ¿Úζ£¡£¡38ËêµÄ¶¼¸ÒÑ¡~Åå·þ£¡£¡\n;break;}elseif(y==2)//Ñ¡ÔñµÄÊÇÊ泩{ifstreamin(Å®ÉúÐÅÏ¢.txt,ios::in);while(!in.eof()){inxmnlchusheng;if(xm==Ê泩){cout»ù±¾ÐÅϢΪ£º;coutxmnlchushengendl;in.close();break;}}coutÊÇ·ñÑ¡ÔñÁ˽â´ËÈ˵ĸü¶àÐÅÏ¢£¿1.ÊÇ2.·ñ\n;u1:stringe;cine;if(e==1){cout¸ü¶àÐÅϢΪ£ºendl;coutÌåÖØ£º43kgÉí¸ß£º163cm±ÏÒµÓÚ±±¾©µÚ¶þÍâ¹úÓïѧԺ¡£\nѪÐÍ£ºABÐÍÖøÃûµÄÑÝÔ±£¬¾µä´ú±í×÷ÓС¶±¦Á«µÆ¡·¡¢¡¶¾«ÎÀÌ¡·¡¢;cout¡¶Ä§»ÃÊÖ»ú¡·£¬ÐÔ¸ñ£ºÎľ²£¬¹ÔÇÉ£¡;coutendl;}elseif(e!=1&&e!=2){cout¶Ô²»Æð£¬ÄãÊäÈëµÄÓÐÎó£¬ÇëÖØÐÂÊäÈë¡£endl;gotou1;}else{}coutÄúÑ¡ÔñµÄÊÇ£ºÊ泩\n;cout²Ô°ëÏÉÔ»£º²Ý£¬ÄãÕæ¸ÒÑ¡£¡È¡¸ö³Âºé˧ÃêËÆ»¹ÓпÉÄÜ\n;break;}elseif(y==3)//Ñ¡ÔñµÄÊÇÁõÒà·Æ{ifstreamin(Å®ÉúÐÅÏ¢.txt,ios::in);while(!in.eof()){inxmnlchusheng;if(xm==ÁõÒà·Æ){cout»ù±¾ÐÅϢΪ£º;coutxmnlchushengendl;in.close();break;}}coutÊÇ·ñÑ¡ÔñÁ˽â´ËÈ˵ĸü¶àÐÅÏ¢£¿1.ÊÇ2.·ñ\n;u2:stringe;cine;if(e==1){cout¸ü¶àÐÅϢΪ£ºendl;coutÌåÖØ£º48kgÉí¸ß£º170cm´óѧ±¾¿Æ±ÏÒµ£¬±ÏÒµÓÚ±±¾©µçӰѧԺ¡£\n³öÉúÓÚºþ±±Î人£¬µ±µØÈ˳Æ--ÁõÜçÃÀ×Ó£¬³öÑݵÄÖøÃûӰƬ¼°µçÊÓ¾çÓУº\n;cout¡¶Ïɽ£ÆæÏÀ´«¡·¡¢¡¶ÉñµñÏÀ¡·¡¢¡¶¹¦·òÖ®Íõ¡·¡¢¡¶ÐÂٻŮÓĻ꡷µÈ£¬µ±Ñ¡Îª80ºóËÄС»¨µ©¡£;coutendl;}elseif(e!=1&&e!=2){cout¶Ô²»Æð£¬ÄãÊäÈëµÄÓÐÎó£¬ÇëÖØÐÂÊäÈë¡£endl;gotou2;}else{}coutÄúÑ¡ÔñµÄÊÇ£ºÁõÒà·Æ\n;cout²Ô°ëÏÉÔ»£º²Á~Õâ¸öÂð.....Èç¹ûŬÁ¦»¹ÊÇÓÐÏ£ÍûÄØ\n;break;}elseif(y==4)//Ñ¡ÔñµÄÊDzÌÒÀÁÖ{ifstreamin(Å®ÉúÐÅÏ¢.txt,ios::in);while(!in.eof()){inxmnlchusheng;if(xm==²ÌÒÀÁÖ){cout»ù±¾ÐÅϢΪ£º;coutxmnlchushengendl;in.close();break;}}coutÊÇ·ñÑ¡ÔñÁ˽â´ËÈ˵ĸü¶àÐÅÏ¢£¿1.ÊÇ2.·ñ\n;u3:stringe;cine;if(e==1){cout¸ü¶àÐÅϢΪ£ºendl;coutÌåÖØ£º41kgÉí¸ß£º161cm±ÏÒµÓŲ́Í帨ÈÊ´óѧ¡£\n³öÉúÓŲ́Í壬ÊÇ̨Íåµ±ºì»ªÓïÅ®¸èÊÖ¡£\n;coutÓëËïÑà×Ë¡¢ÏôÑÇÐù¡¢Áº¾²Èã²¢³ÆΪ̨ÍåËÄСÌìºó¡£;cou
本文标题:c++苍半仙算命代码
链接地址:https://www.777doc.com/doc-4611874 .html