📄 menue5-staticls.cpp
字号:
int staticlacs(int x,int y,int *choice)
{
int kx,ky;
int xs=0,ys=0;
saveimage(x,y,x+,y+,"e:\\keshe\\temp.bmp");
Loadimage(x,y,"e:\\keshe\\staticlacs.bmp");
for(i=0;i<4;i++)
choice[i]=0;
while(1)
{
getkey(&kx,&ky);
if(kx==27) /*esc*/
{
Loadimage(x,y,"e:\\keshe\\temp.bmp");
return 0;
}
else if(kx==13) /*enter*/
{
if(xs==0&&ys==0)
choice[0]=(choice[0]+1)%2;
else if(xs==1&&ys==0)
choice[1]=(choice[1]+1)%2;
else if(xs==0&&ys==1)
choice[2]=(choice[2]+1)%2;
else if(xs==1&&ys==1)
choice[3]=(choice[3]+1)%2;
else if(xs==0&&ys==2) /*确定*/
{
Loadimage(x,y,"e:\\keshe\\temp.bmp");
return 1;
}
else if(xs==0&&ys==2)
{
Loadimage(x,y,"e:\\keshe\\temp.bmp");
return -1;
}
}
else if(ky==80) /*up*/
{
if(ys==2)
{
y=1;
butt_off();
dot();
}
else if(ys==0)
{
ys=2
butt_on();
undot();
}
else
{
ky--;
dot();
undot();
}
}
else if(ky==72)
{
/*down*/
if(ys==2)
{
ys==0;
dot();
butt_off();
}
else if(k==1)
{
ys==2;
udot;
butt_on;
}
else
{
ys++;
undot();
dot();
}
}
else if(ky==75||ky==77)
{
if(ys<2)
{
xs=(xs+1)%2;
undot();
dot();
}
else
{
xs=(xs+1)%2;
butt_on();
butt_off();
}
}
}
}
int menue4()
{
char text[20][80];
int linemax=0; /*当前最大行数*/
int choice[4];
int tax_month[12];
int tax_year;
int wage[N]; /*N技术职工数*/
char string[10];
int month;
int i,j=0;
int age1=0,age2=0,age3=0;
if(staticlacs(x,y,choice)==1)
{
if(choice[0]==1)
{ /*统计年龄*/
statistics_age(ag1,ag2,age3);
putstring("小于二十的职工数:",linemax,0);
linemax++;
putstring("二十到五十的职工数:",linemax,0);
linemax++;
putstring("大于五十的职工数:",linemax,0);
linemax++;
}
if(choice[1]==1) /*统计税收*/
{
statistics_tax(tax_month,tax_year,phead);/*统计职称*/
putstring("一至十二月的税收:",linemax++,0);
for(i=0;i<12;i++)
{
j++;
if(j==2)
{
linemax++;
j=0;
}
ftoa(string,tax_max[i]);
putstring(string,linemax,line*20);
}
putstring("年总税收为:",linemax,0);
ftoa(string,tax_year);
putstring(string,linemax++,20);
}
if(choice[2]) /*统计各职工数和各职称平均工资*/
{
diaologe3(x,y,"输入要统计第几月",&month)
for(i=0;i<n;i++)
statistic_zhicheng(month,zhicheng[i],wage[i],phead);
for(i=0;i<N;i++)
{
}
if(chioce[1]==1) /*统计工资*/
{
diaologe3(x,y,"输入要统计第几月",&month);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -