アドレス帳情報管理システム


C言語で1つの通信録の情報に対して管理するシステムを開発して、通信録の情報管理を実現して、基本的な情報は番号、名前、電話、携帯電話、郵便番号、住所と関係(例えば友达、親友、同僚、同級生など)の基本的な要求を含みます:1.簡単なメニューを設計して、システムの機能の選択を行うことができます.2.情報の入力機能を実現する.3.既存の情報に基づいて新しいレコードを追加します.4.指定した番号のレコードを削除します.5.指定番号の記録を修正する6.情報の閲覧機能を実現する7.番号別照会機能8.携帯電話番号別ソート機能
#include
#include
#include

typedef struct _TEL_INFO
{
	int no;//  
	char name[20];//  
	char tel_num[20];//   
	char phone_num[20];//   
	int code;//  
	char add[20];//  
	char rela_ship[20];//  
}TEL,*PTEL;

int menu()
{
	int chioce;
	system("cls");
	printf("1:     
"); printf("2:
"); printf("3:
"); printf("4:
"); printf("5:
"); printf("6:
"); printf("0:
"); printf(" :"); scanf("%d",&chioce); while(chioce<0||chioce>6) { printf(" :"); scanf("%d",&chioce); } return chioce; } void Print_TEL(PTEL TEL,int n) { int i; printf("%10s%10s%20s%20s%10s%20s%20s
"," "," "," "," "," "," "," "); for(i=0;i0) { temp = tel[i]; tel[i]=tel[j]; tel[j]=temp; } } } Print_TEL(tel,n); system("pause"); } void Sreach_Tel(PTEL tel,int n) { int i,num; system("cls"); printf(" :"); scanf("%d",&num); for(i=0;i6) { printf(" :"); scanf("%d",&chioce); } switch(chioce) { case 1: printf(" :"); scanf("%s",tel[i].name); printf(" !
"); system("pause"); break; case 2: printf(" :"); scanf("%s",tel[i].tel_num); printf(" !
"); system("pause"); break; case 3: printf(" :"); scanf("%s",tel[i].phone_num); printf(" !
"); system("pause"); break; case 4: printf(" :"); scanf("%d",&tel[i].code); printf(" !
"); system("pause"); break; case 5: printf(" :"); scanf("%s",tel[i].add); printf(" !
"); system("pause"); break; case 6: printf(" :"); scanf("%s",tel[i].rela_ship); printf(" !
"); system("pause"); break; } }while(chioce!=0); } int main(int argc,char* argv[]) { int chioce;// TEL tel[100];// int NUM=0;// NUM=Open_File(tel); system("mode con: cols=120 lines=30"); do { chioce=menu(); switch(chioce) { case 1: NUM=Add_Tel(tel,NUM); Save_File(tel,NUM); break; case 2: NUM=Delete_Tel(tel,NUM); Save_File(tel,NUM); break; case 3: Modify_Tel_Menu(tel,NUM); Save_File(tel,NUM); break; case 4: system("cls"); Print_TEL(tel,NUM); system("pause"); break; case 5: Sreach_Tel(tel,NUM); break; case 6: Sort_And_Print(tel,NUM); break; } }while(chioce!=0); return 0; }