You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.4 KiB

6 years ago
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define LEN sizeof(struct dic_info)
6 years ago
struct dic_info
{
char English[40];
char Chinese[100];
};
struct dic_info inf[400];
void enter()
{
}
void add()
{
}
6 years ago
void Edit()
6 years ago
{
}
6 years ago
void Delete()
6 years ago
{
6 years ago
int m;
char a;
6 years ago
char n[40];
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫɾ<EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD>ʣ<EFBFBD>\n");
while(1)
6 years ago
{
scanf("%s",n);
6 years ago
for(m=0;m<400;m++)
6 years ago
{
6 years ago
if(strcmp(n,inf[m].English)==0)
6 years ago
{
6 years ago
inf[m].English=='\0';
inf[m].Chinese=='\0';
printf("ɾ<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>\n");
return;
}
6 years ago
}
6 years ago
printf("<EFBFBD>޴˵<EFBFBD><EFBFBD><EFBFBD>\n");
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>y<EFBFBD><EFBFBD>Y<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ز˵<EFBFBD>\n");
scanf("%c",&a);
if(a=='y'||a=='Y')
{
6 years ago
Delete();
6 years ago
}
break;
6 years ago
}
6 years ago
}
6 years ago
int main(void)
6 years ago
{
int choice,i,n=1;
char a,b;
do
{
printf("\n\t ==============================");
printf("\n\t *<2A><>ӭʹ<D3AD><CAB9><EFBFBD><EFBFBD><EFBFBD>޵<EFBFBD><DEB5><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD>ʵ<EFBFBD>*");
printf("\n\t ==============================\n");
printf("\n\t ***********<2A>˵<EFBFBD><CBB5><EFBFBD>ʾ***********\n");
printf("\n\t ********<2A><>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>********\n");
printf("\n\t ********<2A><>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>********\n");
printf("\n\t ********<2A><>3<EFBFBD><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>********\n");
printf("\n\t ********<2A><>4<EFBFBD><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>********\n");
printf("\n\t ********<2A><>0<EFBFBD><30><EFBFBD>˳<EFBFBD><CBB3>ʵ<EFBFBD>********\n");
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>еĹ<EFBFBD><EFBFBD><EFBFBD>");
scanf("%d",&choice);
switch(choice)
{
case 1:enter();break;
case 2:add();break;
6 years ago
case 3:Delete();
6 years ago
for(i=0;i<n;i++)
6 years ago
scanf("%c",&a);
6 years ago
if(a=='y'||a=='Y')
{
6 years ago
Delete();
6 years ago
n++;
6 years ago
};break;
case 4:Edit();break;
}
6 years ago
}
while(choice!=0);
return 0;
}