-----------------------|");
gotoxy(1,24);printf("||");
gotoxy(1,25);printf("|---------------------------------------------------------------------------|");
gotoxy(10,24);printf("total
is%8.1f$",sum);
fclose(fp);
gotoxy(49,24);printf("press any ");getch();goto pp;
}
基础c语言代码else
{
while(ch[0]!='\r')
{if(j<10)
{strncat(chtime,ch,1);
j++;}
if(ch[0]==8)
{
len=strlen(chtime)-1;
if(j>15)
{len=len+1;j=11;}
strcpy(ch1,"");
j=j-2;
strncat(ch1,chtime,len);
strcpy(chtime,"");
strncat(chtime,ch1,len-1);
gotoxy(13,7);printf("");}
gotoxy(13,7);printf("%s",chtime);ch[0] =getch();
if(ch[0]==9)
goto mm;
if(ch[0]==27)
exit(1);
}
gotoxy(3,24);printf("");
gotoxy(13,10);
j=0;
ch[0]=getch();
while(ch[0]!='\r')
{if(j<14)
{strncat(chshop,ch,1);
j++;}
if(ch[0]==8){len=strlen(chshop)-1;
strcpy(ch1,"");
j=j-2;
strncat(ch1,chshop,len);
strcpy(chshop,"");
strncat(chshop,ch1,len-1);
gotoxy(13,10);printf("");}
gotoxy(13,10);printf("%s",chshop);ch[ 0]=getch();}
gotoxy(13,13);
j=0;
ch[0]=getch();
while(ch[0]!='\r')
{if(j<6)
{strncat(chmoney,ch,1);
j++;}
if(ch[0]==8)
{len=strlen(chmoney)-1;
strcpy(ch1,"");
j=j-2;
strncat(ch1,chmoney,len);
strcpy(chmoney,"");
strncat(chmoney,ch1,len-1);
gotoxy(13,13);printf("");}
gotoxy(13,13);printf("%s",chmoney);ch [0]=getch();}
if((strlen(chshop)==0)||(strlen(chmon ey)==0))
continue;
if((fp=fopen("home.dat","a+"))!=NULL) ;
fprintf(fp,"%10s%14s%6s",chtime,chsho p,chmoney);
fputc('\n',fp);
fclose(fp);
i++;
gotoxy(41,5+i);
printf("%10s%-14s%-6s",chtime,chshop, chmoney);
}}}
===================================== =========================
【程序96】
题目:计算字符串中子串出现的次数
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论