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.
shu-dian-cun-huo-qing-dan/计算机大类1807班18408000733冯晨.cpp

112 lines
3.0 KiB

6 years ago
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int cmp(char str0[],char str1[]) //<2F>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򷵻<EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD><EFBFBD>򷵻ط<F2B7B5BB>0
{
int i;
for(i=0;str0[i]!=0 && str1[i]!=0 && str0[i]==str1[i];i++);
return str0[i]-str1[i];
}
int main(void)
{
char sm[100];
int c=1,i=0,n=0,flag=0,j=0;
struct kc //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9A3AC>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>ĸȡԱ<C8A1><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A1B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>sm<73><6D>
{
char sm[100];
char zz[100];
char cbs[100];
long cbrq;
double jg;
int wz;
int sl;
};
struct kc a[10]=
{ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9BCAE><EFBFBD><EFBFBD>
{"ԹŮ","<EFBFBD>Ű<EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",20090520,29.80,1,100},
{"Χ<EFBFBD><EFBFBD>","Ǯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",19910214,19.00,2,10},
{"<EFBFBD><EFBFBD>¥<EFBFBD><EFBFBD>","<EFBFBD><EFBFBD>ѩ<EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",19961225,59.70,3,100},
{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",20131001,39.80,4,100},
{"һֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",20060927,18.80,5,50},
{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD>ϸ<EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",20171116,39.00,6,60},
{"<EFBFBD><EFBFBD>˹<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",19880707,32.00,7,80},
{"<EFBFBD>ҵ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",20070504,22.00,8,100},
{"Ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɭ<EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD><EFBFBD>","<EFBFBD>Ϻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",20010807,18.80,9,6},
{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","<EFBFBD><EFBFBD>֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",20031101,18.80,10,20}
};
flag1:
printf("***********<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ***********:\n");
printf("**** 1.<2E>鱾¼<E9B1BE><C2BC> ****:\n");
printf("**** 2.<2E><EFBFBD><E9B1BE>ѯ ****:\n");
printf("**************************************:\n");
int choose;
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>:\t");
scanf("%d",&choose); //ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(choose==1)
{
printf("¼<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>");
}
if(choose==2){
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
fflush(stdin);
gets(sm);
j=0; //δ<>ҵ<EFBFBD><D2B5><EFBFBD><E9BCAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱʹj<CAB9><6A><EFBFBD><EFBFBD><E3A3AC>ֹ<EFBFBD><D6B9><EFBFBD>ٴ<EFBFBD>û<EFBFBD>ҵ<EFBFBD><D2B5>鼮ʱ<E9BCAE><CAB1>j<EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>10<31><30><EFBFBD>޷<EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>if<69><66><EFBFBD><EFBFBD><E4A3AC><EFBFBD>޷<EFBFBD><DEB7>õ<EFBFBD>δ<EFBFBD><CEB4><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ʾ
for(i=0;i<10;i++)
{
j++; //<2F><>j<EFBFBD>ӵ<EFBFBD>10ʱ<30><CAB1>˵<EFBFBD><CBB5>û<EFBFBD><C3BB><EFBFBD>ҵ<EFBFBD><D2B5>
if(cmp(a[i].sm,sm)==0)
{
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
puts(a[i].sm);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
puts(a[i].zz);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
puts(a[i].cbs);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:%d\n",a[i].cbrq);
printf("<EFBFBD>۸<EFBFBD>:%lf\n",a[i].jg);
printf("λ<EFBFBD><EFBFBD>:%d\n",a[i].wz);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:%d\n",a[i].sl);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
fflush(stdin);
scanf("%d",&n);
if(n<=a[i].sl)
printf("<EFBFBD>ܼ<EFBFBD>Ϊ %lf\n",(n*a[i].jg));
else
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><EFBFBD>Χ<EFBFBD><EFBFBD>\n");
printf("<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鼮?(<28><> 1: <20><> 0:˫<><CBAB><EFBFBD>س<EFBFBD><D8B3><EFBFBD>)\n");
fflush(stdin);
scanf("%d",&c);
if(c==1)
goto flag1;
else
{
j=0; //<2F><>Ҫ<EFBFBD>˳<EFBFBD>ʱʹj<CAB9><6A><EFBFBD><EFBFBD><E3A3AC>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鼮λ<E9BCAE><CEBB>Ϊ10ʱ<30><CAB1><EFBFBD><EFBFBD>for<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jҲΪ10<31><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>if<69><66><EFBFBD><EFBFBD>
printf("лл,<2C>ټ<EFBFBD>!\n");
}
}
}
if(j=10)
{
j=0;
printf("δ<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Y<EFBFBD><EFBFBD>y<EFBFBD><EFBFBD>N<EFBFBD><EFBFBD>n)\n");
fflush(stdin); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6A3AC>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD><C2B4><EFBFBD><EFBFBD><EFBFBD>
scanf("%c",&c);
if(c==1)
goto flag1;
else
{
printf("лл<EFBFBD><EFBFBD><EFBFBD>ټ<EFBFBD>!\n");
}
}
return 0;
}
}