《课程设计-手机通讯录》由会员分享,可在线阅读,更多相关《课程设计-手机通讯录(3页珍藏版)》请在金锄头文库上搜索。
#include #include using namespace std;struct Person char name20; char tel20; ;int main() int k,i,j; int COUNT=0; Person pCOUNT; char name20; char tel20; while(1) coutk;switch(k) case 1: if( COUNTpi.name; cinpi.tel; else coutpi.name; coutpj.name;coutpj.tel; Person tmp; for(i=0;ii;j=j-1) if(strcmp(pj.name,pj-1.name)i; if(i0) for(j=i;jname; i=0; while(strcmp(name,pi.name)!=0) +i; if(i=COUNT) break; if(i=COUNT)cout“查找无此人“endl; else coutpi.name“t“pi.telendl; break; default: return 0; return 0;