日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

c语文编程提取郑码的单字码表

發布時間:2025/3/12 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c语文编程提取郑码的单字码表 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
incode.txtson文件鏈接:https://pan.baidu.com/s/1ZNpe0bZJcMPPQYKo97Y9OQ 提取碼:22br

1.代碼如下:

#include <stdio.h> #include <stdlib.h> #include <string.h>int main() {FILE *fp;char ch,index[10];int i=0;printf("please input the filename:");if (!(fp=fopen("incode.txt","r"))){printf("Failed to open file");exit(0);}scanf("%s",index);char str[20];char strChina[4];int k=0;int c;int flat = 1;while(ch != EOF){ch=fgetc(fp);if(ch>='a'&&ch<='z'){flat = 1;str[k] = ch;k++;}else if(ch == ' ' && flat == 1){flat = 0;str[k] = '\0';c = k = 0;if(strcmp(str,index) == 0){while(1){ch=fgetc(fp);if(ch == ' ' || ch >=3)break;strChina[c] = ch;c++;}strChina[c] = '\0';if(c == 2){printf("%s",strChina);} break;}}}fclose(fp);return 0; }

2.TCC編譯后輸出

總結

以上是生活随笔為你收集整理的c语文编程提取郑码的单字码表的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。