c語言通訊代碼,c語言通訊代碼有哪些

本文目錄一覽:

求C語言程序設計手機通訊錄代碼,急,

//這個是我教材上的,不知道你要的是不這個

#includestdio.h

#includestring.h

struct friends_list

{

char name[10];

int age;

char telephone[13];

};

int Count=0;

void new_friend(struct friends_list friends[]);

void search_friend(struct friends_list friends[],char *name);

int main(void)

{

int choice;

char name[10];

struct friends_list friends[50];

do

{

printf(“通訊錄功能選項:1:新建2:查詢0:退出\n”);

printf(“請選擇功能:\n”);

scanf(“%d”,choice);

switch(choice)

{

case 1:new_friend(friends);

break;

case 2:printf(“請輸入要查找的聯繫人姓名:”);

scanf(“%s”,name);

search_friend(friends,name);

break;

case 0:break;

}

}

while(choice!=0);

printf(“謝謝使用通訊錄功能!\n”);

return 0;

}

void new_friend(struct friends_list friends[])

{

struct friends_list f;

if(Count==50)

{

printf(“通訊錄已滿!\n”);

return;

}

printf(“請輸入新聯繫人的姓名:”);

scanf(“%s”,f.name);

printf(“請輸入新聯繫人的年齡:”);

scanf(“%d”,f.age);

printf(“請輸入新聯繫人的聯繫電話:”);

scanf(“%s”,f.telephone);

friends[Count]=f;

Count++;

}

void search_friend(struct friends_list friends[],char *name)

{

int i,flag=0;

if(Count==0)

{

printf(“通訊錄是空的!\n”);

return;

}

for(i=0;iCount;i++)

if(strcmp(name,friends[i].name)==0)

{

flag=1;

break;

}

if(flag)

{

printf(“姓名:%s\t”,friends[i].name);

printf(“年齡:%d\t”,friends[i].age);

printf(“電話:%s\n”,friends[i].telephone);

}

else

printf(“無此聯繫人!”);

}

C語言的通訊錄代碼是什麼?

#include stdio.h

#include stdlib.h

#include string.h

#include conio.h

#define N 100 void input();//添加新用戶函數

void amend();//修改用戶信息函數

void delete_client();//刪除用戶信息函數

void demand_client();//用戶信息查詢函數

void collect_telephone();//用戶信息匯總函數

void save_client(struct telephone message);//保存函數

void demand_name();//按用戶名查詢

void demand_telephone();//按電話號碼查詢

struct telephone

{

char client_name[20];

char client_address[30];

char client_telephone[15];

}; //添加新用戶函數

void input()

{

struct telephone message;

char reply=’y’;

char save=’y’;

while (reply==’y’)

{ printf(“用戶姓名:”);

scanf(“%s”,message.client_name);

printf(“電話號碼:”);

scanf(“%s”,message.client_telephone); save_client(message);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //保存函數

void save_client(struct telephone message)

{

FILE *fp;

fp=fopen(“message.dat”,”a+”);

if (fp!=NULL)

{

fwrite(message,sizeof(struct telephone),1,fp);

}

else

{

printf(“\n打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

} //修改用戶信息函數

void amend()

{

struct telephone message;

FILE *fp;

char amend_name[20];

char reply=’y’;

char found=’y’;

char save=’y’;

int size=sizeof(struct telephone);

while (reply==’y’)

{

found=’n’;

fp=fopen(“message.dat”,”r+w”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n請輸入要修改的姓名:”);

scanf(“%s”,amend_name);

while ((fread(message,size,1,fp))==1)

{

if ((strcmp(amend_name,message.client_name))==0)

{

found=’y’;

break;

}

}

if (found==’y’)

{ printf(“==========================================\n”);

printf(“\n用戶姓名:%s\n”,message.client_name);

printf(“\n電話號碼:%s\n”,message.client_telephone);

printf(“==========================================\n”);

printf(“修改用戶信息:\n”);

printf(“\n用戶姓名:”);

scanf(“%s”,message.client_name); printf(“\n電話號碼:”);

scanf(“%s”,message.client_telephone);

printf(“\n要保存嗎?(y/n):”);

scanf(” %c”,save);

if (save==’y’)

{

fseek(fp,-size,1);

fwrite(message,sizeof(struct telephone),1,fp);

}

}

else

{

printf(“無此人信息!\n”);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //刪除用戶信息函數

void delete_client()

{

struct telephone message[N];

struct telephone temp_str;

struct telephone delete_str;

int i=0,j=0;

char reply=’y’;

char found=’y’;

char confirm=’y’;

char delete_name[20];

FILE *fp;

while (reply==’y’)

{

system(“cls”);

fp=fopen(“message.dat”,”r”);

if (fp!=NULL)

{

i=0;

found=’n’;

printf(“\n請輸入姓名:”);

scanf(“%s”,delete_name);

while ((fread(temp_str,sizeof(struct telephone),1,fp))==1)

{

if ((strcmp(delete_name,temp_str.client_name))==0)

{

found=’y’;

delete_str=temp_str;

}//查找要刪除的記錄

else

{

message[i]=temp_str;

i++;

}//將其它無關記錄保存起來

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

if (found==’y’)

{

printf(“==========================================\n”);

printf(“用戶姓名:%s\n”,delete_str.client_name);

printf(“電話號碼:%s\n”,delete_str.client_telephone);

printf(“==========================================\n”);

}

else

{

printf(“無此人信息,按任意鍵返回……\n”);

getchar();

break;

}

printf(“確定要刪除嗎?(y/n):”);

scanf(” %c”,confirm);

if (confirm==’y’)

{

fp=fopen(“message.dat”,”w”);

if (fp!=NULL)

{

for(j=0;ji;j++)

{

fwrite(message[j],sizeof(struct telephone),1,fp);

}

printf(“記錄已刪除!!!\n”);

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

}

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

}

//用戶信息查詢函數

void demand_client()

{

int choice=1;

while (choice!=3)

{

system(“cls”);

printf(“電話查詢菜單\n”);

printf(” 1 按聯繫人姓名查詢\n”);

printf(” 2 按聯繫人電話號碼查詢\n”);

printf(” 3 返回主菜單\n”);

printf(“請選擇(1-3):”);

scanf(“%d%*c”,choice);

if (choice3)

{

printf(“請輸入1-6之間的整數\n”);

printf(“按任意鍵返回菜單……\n”);

getchar();

continue;

}

if (choice==1)

{

demand_name();

}

else if (choice==2)

{

demand_telephone();

}

}

} //按用戶名查詢

void demand_name()

{

struct telephone message;

FILE *fp;

char amend_name[20];

char reply=’y’;

char found=’y’;

while (reply==’y’)

{

found=’n’;

fp=fopen(“message.dat”,”r+w”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n請輸入姓名:”);

scanf(“%s”,amend_name);

while ((fread(message,sizeof(struct telephone),1,fp))==1)

{

if ((strcmp(amend_name,message.client_name))==0)

{

found=’y’;

break;

}

}

if (found==’y’)

{ printf(“==========================================\n”);

printf(“用戶姓名:%s\n”,message.client_name); printf(“電話號碼:%s\n”,message.client_telephone);

printf(“==========================================\n”);

}

else

{

printf(“無此人信息!\n”);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //按電話號碼查詢

void demand_telephone()

{

struct telephone message;

FILE *fp;

char telephone[20];

char reply=’y’;

char found=’y’;

while (reply==’y’)

{

found=’n’;

fp=fopen(“message.dat”,”r+w”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n請輸入電話號碼:”);

scanf(“%s”,telephone);

while ((fread(message,sizeof(struct telephone),1,fp))==1)

{

if ((strcmp(telephone,message.client_telephone))==0)

{

found=’y’;

break;

}

}

if (found==’y’)

{ printf(“==========================================\n”);

printf(“用戶姓名:%s\n”,message.client_name); printf(“電話號碼:%s\n”,message.client_telephone);

printf(“==========================================\n”);

}

else

{

printf(“無此電話號碼的有關信息!\n”);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //用戶信息匯總函數

void collect_telephone()

{

struct telephone message;

FILE *fp;

fp=fopen(“message.dat”,”r”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n用戶姓名\t\t電話號碼\n”);

while ((fread(message,sizeof(struct telephone),1,fp))==1)

{

printf(“\n%-24s”,message.client_name); printf(“%-12s\n”,message.client_telephone);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“按任意鍵返回主菜單……\n”);

getch();

} void main()

{

char choice[10]=””;

int len=0;

while (choice[0]!=’7′)

{ printf(“\t==========電話本號碼查詢系統=============\n”); printf(“\t\t 1、添加新聯繫人\n”);

printf(“\t\t 2、修改聯繫人信息\n”);

printf(“\t\t 3、刪除聯繫人信息\n”);

printf(“\t\t 4、聯繫人信息查詢\n”);

printf(“\t\t 5、聯繫人信息匯總\n”);

printf(“\t\t 7、退出\n”);

printf(“\t=========================================\n”);

printf(“請選擇(1-7):”);

scanf(“%s”,choice);

len=strlen(choice);

if (len1)

{

printf(“請輸入1-6之間的整數\n”);

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

continue;

} switch (choice[0]) {

case ‘1’:

input();

break;

case ‘2’:

amend();

break;

case ‘3’:

delete_client();

break;

case ‘4’:

demand_client();

break;

case ‘5’:

collect_telephone();

break; default:

break;

}

}

}

通訊錄的C語言代碼

分析:

跟據樓主的意思!我們可以得出,這個程序只要求我們寫查詢通迅錄的內容

而通迅錄的內容,可以通過初始化得出!

簡而言之:寫一個查詢函數

呵呵···把問題相通了,我們就開始寫算法吧let’s go!!!

—————————————————————-

算法:

1.獲得用戶的輸入 (就是要查詢的對象的名字)

2.查詢 (在這我用窮舉通迅錄的方式查詢了,^_^^_^)

3.輸出查詢結果

算法就這樣被我們征服了!!!呵呵~~好有成就感哇!!

但我們現在還不能開始編碼,我得們先想好怎麼編,要做到胸有成竹!!!

那我現在來想一下該怎麼編碼吧!let’s go!!!

—————————————————————-

要保存通迅的信息,那麼我們得用一個結構體吧:

struct friends

{

char name[20]; /* 名字不能寫得太長哦 */

char province[20]; /* 省份 */

char city[20]; /* 所在城市 */

char nation[20]; /* 民族 */

char sex[2]; /* 性別 M/F */

int age; /* 年齡 */

};

要獲得用戶輸入,要用個 char search_name[20];

查詢結果反回一個數,記錄對象在通迅錄中的位置:int index;

查詢中有用要循環,用一個記數器: int i;

—————————————————————-

OK,該用的變量我們都想好了!算法我們也想好了。還等什麼呢,開始編碼吧

呵呵~~是不是等這個時候都等得急了~~~~~

——————————————————————-

*******************************************************************

******* 程序實現:

*******************************************************************

#include stdio.h

#include string.h

#include stdlib.h

/* 定義保存通迅錄的信息 */

struct friends

{

char name[20]; /* 名字 */

char province[20]; /* 省份 */

char city[20]; /* 所在城市 */

char nation[20]; /* 民族 */

char sex[2]; /* 性別 M/F */

int age; /* 年齡 */

};

void getname (char search_name[]);

int search (struct friends friend_list[], char search_name[]);

void print_result(struct friends friend_list[], int index);

int main (void)

{

int index;

char search_name[20];

struct friends friend_list[4] = {

,

,

,

,

};

(void) getname (search_name); /* 獲得用戶輸入 */

index = search (friend_list, search_name); /* 查詢 */

(void) print_result (friend_list,index); /* 打印結果 */

return 0;

}

/****************************************

*** 函數名:getname

*** 功能:獲得用戶要查詢的對象的名字

****************************************/

void getname (char search_name[])

{

printf (“Pleace enter the name of your friends you want to search”);

scanf (“%s”, search_name);

}

/****************************************

*** 函數名:search

*** 功能:查詢對象

****************************************/

int search (struct friends friend_list[], char search_name[])

{

int i;

/* 窮舉通迅錄 */

for (i = 0; i 4; ++i)

{

if (strcmp(friend_list[i].name, search_name) == 0)

{

return (i);

}

}

if (i == 4)

{

printf (“I am sorry! there is nobody by the name you enter!\n”);

fflush(stdin);

getchar();

exit (0);

}

}

/****************************************

*** 函數名:print_result

*** 功能:打印結果

****************************************/

void print_result(struct friends friend_list[], int index)

{

printf (“the imformation of %s:\n”, friend_list[index].name);

printf (“————————————————\n”);

printf (” NAME: %-s\n”, friend_list[index].name);

printf (“PROVINCE: %-s\n”, friend_list[index].province);

printf (” CITY: %-s\n”, friend_list[index].city);

printf (” NATION: %-s\n”, friend_list[index].nation);

printf (” SEX: %-s\n”, friend_list[index].sex);

printf (” AGE: %-d\n”, friend_list[index].age);

printf (“————————————————-\n”);

fflush(stdin);

getchar();

}

*****************************************************************************

*****************************************************************************

呵呵~~一口氣把它寫出來了!!!前期寫算法是很重要的!!

現在還沒結束!!我們要先來測試一下!!

--------------------------------------

Pleace enter the name of your friends you want to searchlihan

the imformation of lihan:

————————————————

NAME: lihan

PROVINCE: liaoning

CITY: huluodao

NATION: han

SEX: M

AGE: 19

————————————————-

--------------------------------------

Pleace enter the name of your friends you want to searchlbmzwyy

I am sorry! there is nobody by the name you enter!

說明成功了~~~呵呵~~太高興了~~

--------------------------------------

請記注一點:剋制編碼的誘惑

無論多麼小的問題都要先分析好問題,想好算法,才能開始編碼!!!我相信這樣做一定對你有好處的!

如果對您有幫助,請記得採納為滿意答案,謝謝!祝您生活愉快!

通訊錄代碼 C語言 跪求

#include stdio.h

#include stdlib.h

#include string.h

#include conio.h

#define N 100 void input();//添加新用戶函數

void amend();//修改用戶信息函數

void delete_client();//刪除用戶信息函數

void demand_client();//用戶信息查詢函數

void collect_telephone();//用戶信息匯總函數

void save_client(struct telephone message);//保存函數

void demand_name();//按用戶名查詢

void demand_telephone();//按電話號碼查詢

struct telephone

{

char client_name[20];

char client_address[30];

char client_telephone[15];

}; //添加新用戶函數

void input()

{

struct telephone message;

char reply=’y’;

char save=’y’;

while (reply==’y’)

{ printf(“用戶姓名:”);

scanf(“%s”,message.client_name);

printf(“電話號碼:”);

scanf(“%s”,message.client_telephone); save_client(message);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //保存函數

void save_client(struct telephone message)

{

FILE *fp;

fp=fopen(“message.dat”,”a+”);

if (fp!=NULL)

{

fwrite(message,sizeof(struct telephone),1,fp);

}

else

{

printf(“\n打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

} //修改用戶信息函數

void amend()

{

struct telephone message;

FILE *fp;

char amend_name[20];

char reply=’y’;

char found=’y’;

char save=’y’;

int size=sizeof(struct telephone);

while (reply==’y’)

{

found=’n’;

fp=fopen(“message.dat”,”r+w”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n請輸入要修改的姓名:”);

scanf(“%s”,amend_name);

while ((fread(message,size,1,fp))==1)

{

if ((strcmp(amend_name,message.client_name))==0)

{

found=’y’;

break;

}

}

if (found==’y’)

{ printf(“==========================================\n”);

printf(“\n用戶姓名:%s\n”,message.client_name);

printf(“\n電話號碼:%s\n”,message.client_telephone);

printf(“==========================================\n”);

printf(“修改用戶信息:\n”);

printf(“\n用戶姓名:”);

scanf(“%s”,message.client_name); printf(“\n電話號碼:”);

scanf(“%s”,message.client_telephone);

printf(“\n要保存嗎?(y/n):”);

scanf(” %c”,save);

if (save==’y’)

{

fseek(fp,-size,1);

fwrite(message,sizeof(struct telephone),1,fp);

}

}

else

{

printf(“無此人信息!\n”);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //刪除用戶信息函數

void delete_client()

{

struct telephone message[N];

struct telephone temp_str;

struct telephone delete_str;

int i=0,j=0;

char reply=’y’;

char found=’y’;

char confirm=’y’;

char delete_name[20];

FILE *fp;

while (reply==’y’)

{

system(“cls”);

fp=fopen(“message.dat”,”r”);

if (fp!=NULL)

{

i=0;

found=’n’;

printf(“\n請輸入姓名:”);

scanf(“%s”,delete_name);

while ((fread(temp_str,sizeof(struct telephone),1,fp))==1)

{

if ((strcmp(delete_name,temp_str.client_name))==0)

{

found=’y’;

delete_str=temp_str;

}//查找要刪除的記錄

else

{

message[i]=temp_str;

i++;

}//將其它無關記錄保存起來

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

if (found==’y’)

{

printf(“==========================================\n”);

printf(“用戶姓名:%s\n”,delete_str.client_name);

printf(“電話號碼:%s\n”,delete_str.client_telephone);

printf(“==========================================\n”);

}

else

{

printf(“無此人信息,按任意鍵返回……\n”);

getchar();

break;

}

printf(“確定要刪除嗎?(y/n):”);

scanf(” %c”,confirm);

if (confirm==’y’)

{

fp=fopen(“message.dat”,”w”);

if (fp!=NULL)

{

for(j=0;ji;j++)

{

fwrite(message[j],sizeof(struct telephone),1,fp);

}

printf(“記錄已刪除!!!\n”);

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

}

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

}

//用戶信息查詢函數

void demand_client()

{

int choice=1;

while (choice!=3)

{

system(“cls”);

printf(“電話查詢菜單\n”);

printf(” 1 按聯繫人姓名查詢\n”);

printf(” 2 按聯繫人電話號碼查詢\n”);

printf(” 3 返回主菜單\n”);

printf(“請選擇(1-3):”);

scanf(“%d%*c”,choice);

if (choice3)

{

printf(“請輸入1-6之間的整數\n”);

printf(“按任意鍵返回菜單……\n”);

getchar();

continue;

}

if (choice==1)

{

demand_name();

}

else if (choice==2)

{

demand_telephone();

}

}

} //按用戶名查詢

void demand_name()

{

struct telephone message;

FILE *fp;

char amend_name[20];

char reply=’y’;

char found=’y’;

while (reply==’y’)

{

found=’n’;

fp=fopen(“message.dat”,”r+w”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n請輸入姓名:”);

scanf(“%s”,amend_name);

while ((fread(message,sizeof(struct telephone),1,fp))==1)

{

if ((strcmp(amend_name,message.client_name))==0)

{

found=’y’;

break;

}

}

if (found==’y’)

{ printf(“==========================================\n”);

printf(“用戶姓名:%s\n”,message.client_name); printf(“電話號碼:%s\n”,message.client_telephone);

printf(“==========================================\n”);

}

else

{

printf(“無此人信息!\n”);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //按電話號碼查詢

void demand_telephone()

{

struct telephone message;

FILE *fp;

char telephone[20];

char reply=’y’;

char found=’y’;

while (reply==’y’)

{

found=’n’;

fp=fopen(“message.dat”,”r+w”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n請輸入電話號碼:”);

scanf(“%s”,telephone);

while ((fread(message,sizeof(struct telephone),1,fp))==1)

{

if ((strcmp(telephone,message.client_telephone))==0)

{

found=’y’;

break;

}

}

if (found==’y’)

{ printf(“==========================================\n”);

printf(“用戶姓名:%s\n”,message.client_name); printf(“電話號碼:%s\n”,message.client_telephone);

printf(“==========================================\n”);

}

else

{

printf(“無此電話號碼的有關信息!\n”);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“要繼續嗎?(y/n):”);

scanf(” %c”,reply);

}

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

} //用戶信息匯總函數

void collect_telephone()

{

struct telephone message;

FILE *fp;

fp=fopen(“message.dat”,”r”);

if (fp!=NULL)

{

system(“cls”);

printf(“\n用戶姓名\t\t電話號碼\n”);

while ((fread(message,sizeof(struct telephone),1,fp))==1)

{

printf(“\n%-24s”,message.client_name); printf(“%-12s\n”,message.client_telephone);

}

}

else

{

printf(“打開文件時出現錯誤,按任意鍵返回……\n”);

getchar();

return;

}

fclose(fp);

printf(“按任意鍵返回主菜單……\n”);

getch();

} void main()

{

char choice[10]=””;

int len=0;

while (choice[0]!=’7′)

{ printf(“\t==========電話本號碼查詢系統=============\n”); printf(“\t\t 1、添加新聯繫人\n”);

printf(“\t\t 2、修改聯繫人信息\n”);

printf(“\t\t 3、刪除聯繫人信息\n”);

printf(“\t\t 4、聯繫人信息查詢\n”);

printf(“\t\t 5、聯繫人信息匯總\n”);

printf(“\t\t 7、退出\n”);

printf(“\t=========================================\n”);

printf(“請選擇(1-7):”);

scanf(“%s”,choice);

len=strlen(choice);

if (len1)

{

printf(“請輸入1-6之間的整數\n”);

printf(“按任意鍵返回主菜單……\n”);

getchar();

getchar();

continue;

} switch (choice[0]) {

case ‘1’:

input();

break;

case ‘2’:

amend();

break;

case ‘3’:

delete_client();

break;

case ‘4’:

demand_client();

break;

case ‘5’:

collect_telephone();

break; default:

break;

}

}

}

原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-hant/n/187111.html

(0)
打賞 微信掃一掃 微信掃一掃 支付寶掃一掃 支付寶掃一掃
小藍的頭像小藍
上一篇 2024-11-27 13:35
下一篇 2024-11-27 13:35

相關推薦

  • Python周杰倫代碼用法介紹

    本文將從多個方面對Python周杰倫代碼進行詳細的闡述。 一、代碼介紹 from urllib.request import urlopen from bs4 import Bea…

    編程 2025-04-29
  • Python字符串寬度不限制怎麼打代碼

    本文將為大家詳細介紹Python字符串寬度不限制時如何打代碼的幾個方面。 一、保持代碼風格的統一 在Python字符串寬度不限制的情況下,我們可以寫出很長很長的一行代碼。但是,為了…

    編程 2025-04-29
  • Python基礎代碼用法介紹

    本文將從多個方面對Python基礎代碼進行解析和詳細闡述,力求讓讀者深刻理解Python基礎代碼。通過本文的學習,相信大家對Python的學習和應用會更加輕鬆和高效。 一、變量和數…

    編程 2025-04-29
  • Python 常用數據庫有哪些?

    在Python編程中,數據庫是不可或缺的一部分。隨着互聯網應用的不斷擴大,處理海量數據已成為一種趨勢。Python有許多成熟的數據庫管理系統,接下來我們將從多個方面介紹Python…

    編程 2025-04-29
  • AES加密解密算法的C語言實現

    AES(Advanced Encryption Standard)是一種對稱加密算法,可用於對數據進行加密和解密。在本篇文章中,我們將介紹C語言中如何實現AES算法,並對實現過程進…

    編程 2025-04-29
  • 學習Python對學習C語言有幫助嗎?

    Python和C語言是兩種非常受歡迎的編程語言,在程序開發中都扮演着非常重要的角色。那麼,學習Python對學習C語言有幫助嗎?答案是肯定的。在本文中,我們將從多個角度探討Pyth…

    編程 2025-04-29
  • 倉庫管理系統代碼設計Python

    這篇文章將詳細探討如何設計一個基於Python的倉庫管理系統。 一、基本需求 在着手設計之前,我們首先需要確定倉庫管理系統的基本需求。 我們可以將需求分為以下幾個方面: 1、庫存管…

    編程 2025-04-29
  • Python滿天星代碼:讓編程變得更加簡單

    本文將從多個方面詳細闡述Python滿天星代碼,為大家介紹它的優點以及如何在編程中使用。無論是剛剛接觸編程還是資深程序員,都能從中獲得一定的收穫。 一、簡介 Python滿天星代碼…

    編程 2025-04-29
  • Python通配符有哪些

    Python通配符是一種表示字符串中模糊匹配的有效工具,用於匹配與具有特定模式匹配的字符串。Python中主要的通配符有:*,?,[]和{}。 一、星號通配符 * 在Python中…

    編程 2025-04-29
  • 寫代碼新手教程

    本文將從語言選擇、學習方法、編碼規範以及常見問題解答等多個方面,為編程新手提供實用、簡明的教程。 一、語言選擇 作為編程新手,選擇一門編程語言是很關鍵的一步。以下是幾個有代表性的編…

    編程 2025-04-29

發表回復

登錄後才能評論