學(xué)生成績(jī)管理啊 - 免費(fèi)下載

源碼資源 文件大小:263 K

?? 資源詳細(xì)信息

文件格式
未知
所屬分類
上傳用戶
上傳時(shí)間
文件大小
263 K
所需積分
2 積分
推薦指數(shù)
??? (3/5)

?? 溫馨提示:本資源由用戶 767483511 上傳分享,僅供學(xué)習(xí)交流使用。如有侵權(quán),請(qǐng)聯(lián)系我們刪除。

資源簡(jiǎn)介

#include "string.h"
#include "ctype.h"
#include "stdio.h"
search(char pd[])
{FILE *fp;
 int time=0,i=0,j=0,add[80],k=0,m;
 char *ch,
 str[900];
 m=strlen(pd);
 if((fp=fopen("haha.txt","r"))==NULL)
 {
  printf("Cannot open this file\n");
  exit(0);
 }
for(;!feof(fp);i++)
 {
 str[i]=fgetc(fp);
  if(tolower(str[i])==tolower(pd[k]))
   {k++;
    if(k==m)
    if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp))))
    {
     time++;
     add[j]=i-m+1;
     j++;
     k=0;
    }
    else k=0;
  }
 }
  if(time)
 {
  printf("The time is:%d\n",time);
  printf("The adders is:\n");
  for(i=0;i<j;i++)
  printf("%5d",add[i]);
  if(i%5==0)
  printf("\n");
  getch();
  fclose(fp);
  }
  else
  printf("Sorry!Cannot find the word(^_^)");
}
main()
{
char pd[10],choose='y';
int flag=1;
    while(flag)
   {printf("In put the word you want to seqarch:");
    scanf("%s",pd);
    search(strlwr(pd));
    printf("\nWould you want to continue?(Y/N):");
    getchar();
    scanf("%c",&choose);
    if((tolower(choose))=='n')
    flag=0;
    else flag=1;
   }
  printf("Thanks for your using!Bye-bye!\n");
  getch();
}


立即下載此資源

提示:下載后請(qǐng)用壓縮軟件解壓,推薦使用 WinRAR 或 7-Zip

資源說(shuō)明

?? 下載說(shuō)明

  • 下載需消耗 2積分
  • 24小時(shí)內(nèi)重復(fù)下載不扣分
  • 支持?jǐn)帱c(diǎn)續(xù)傳
  • 資源永久有效

?? 使用說(shuō)明

  • 下載后用解壓軟件解壓
  • 推薦 WinRAR 或 7-Zip
  • 如有密碼請(qǐng)查看說(shuō)明
  • 解壓后即可使用

?? 積分獲取

  • 上傳資源獲得積分
  • 每日簽到免費(fèi)領(lǐng)取
  • 邀請(qǐng)好友注冊(cè)獎(jiǎng)勵(lì)
  • 查看詳情 →

相關(guān)標(biāo)簽

點(diǎn)擊標(biāo)簽查看更多相關(guān)資源:

相關(guān)資源推薦