⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 new 200.txt

📁 贪吃蛇”游戏是一个经典的游戏
💻 TXT
字号:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define TEL
#define consumer
struct consumer                                           
{
 char* get_num(char num[]);               
 char* get_passwd(char pwd[]);
 char* set_num(char num[]);
 char* set_passwd(char pwd[]);                           
};
struct TEL
{
 void welcome();
 void check_passwd(char num[],char pwd[]);
void function1();
  void input_phonenum();
  void function2();
     void change_passwd();
     void information();
     void transform();
     void set_num();
  void exitTEL();
};

char* consumer.get_num(char num[])
{
 return num;
}
char* consumer.get_passwd(char pwd[])
{
 return passwd;
}
char* consumer.set_num(char num[])
{
 strcpy(num,Num)
}
char* consumer.set_passwd(char pwd[])
{
 strcpy(passwd,pwd);
}

void TEL.welcome()
{int times;
 times=0;
 printf("welcome using 200phone serve system!\n")

 char num[20],pwd[10];
   printf("Please input the card num:");
    scanf("%s",num);
   printf("Please input the password:");
    scanf("%s",pwd);

    if(!check_passwd(num,pwd))
    {printf("the num or pwd you input is wrong,please input again\n");
      times++;
    }
    else
    {
      function1();
    }
 }while(times<3);                                              
   exitTEL();

void TEL.check_passwd(char num[],char pwd[])
{
 if(strcmp(num,consumer.get_num())==0&&strcmp(pwd,consumer.get_passwd())==0)
  return true;
 else
  return false;
}

void TEL.function1()
{
   int j;
   do
   {
     printf("\nPlease input the suitable number to control:\n");
     printf("(1)Make a common call\n(2)Make a IP call\n(3)Selection of functions\n");
     scanf("%d",&j);
     while(j<1||j>3)
	 {printf("Please input the right control number!\n"
      scanf("%d",&j);
	 }
   if(j=1||j=2) input_phonenum();break;
   else if(j=3) function2();break;
   }while (ture);
}

void TEL.input phonenum()
{char num[];
printf("Please input the phone number that you want to call: ,input the sign # to end!\n");
scanf("%s",num);
}

void TEL.function2()
{int n;
  do
  {printf("\nPlease input the suitable number to control:\n");
   printf("(1)Change password\n(2)look up information\n(3)set a short card num\n(4)Transform the rest money\n");
   scanf("%d",&n);
   while(n<1||n>4)
   {printf("Please input the right control number!\n");
    scanf("%d",&n);
   }
    switch(n)
   {case 1: change_passwd();break;
    case 2: information();break;
    case 3: set_num();break;
    case 4: transform();break;
   }
}

 void TEL;change_passwd()
{int times;
 char pwd[10],repwd[10];

 times=0;
 do
 {
 printf("\nPlease input the old password:")
 scanf("%s",pwd)
    if(!check_passwd(consumer.get_num(),pwd))
  times++;
 else
  break;
 }while(times<3);

 if(times==3)
  exitTEL();

 int t=0;
    do
 {printf("Please input the new password:");
  scanf("%s",pwd);
  printf("Please input the new password again:");
  scanf("%s",repwd);
  if((t=strcmp(pwd,repwd))!=0)
  printf("The two passwords you input are not the same,please input again!\n");
 }while(t!=0);

 consumer.set_passwd();
printf("the password changing is succeed,please remember firmly!\n");
}

void TEL.information()
{

printf("the rest money is:\n");

}

void TEL.set_num()
{char num[8],renum[8];
 int t=0;
 do
 { printf("Please input the short card num:");
   scanf("%s",&num);
   printf("Please input the the new num again:");
   scanf("%s",&renum);
   if((t=strcmp(num,renum))!=0)
     printf("The two nums you input are not the same,please input again!\n");
  }while(t!=0);

  consumer.set_num();
   printf("the short num setting is succeed,please remember firmly!\n");
}

void TEL.transform()
 {char num[],renum[];
   printf("Please input the card number that you transform in:");
  scanf("%s",num);
  printf("Please input again the card number that you transform in:");
  scanf("%s",renum);
  if(num!=renum)
  printf("The two card numbers you input are not the same,please input again!\n");
 }

void TEL.exitATM()
{
 printf("\nThank you for having used 200phone,goodbye!");
 exit(0);
}

void main()                                               
{ 
  consumer c1("123456789","123456");
  void TEL.welcome();                                             
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -