當前位置:首頁 » 文件管理 » 怎麼壓縮字母

怎麼壓縮字母

發布時間: 2023-09-09 16:57:50

㈠ 電腦中文件怎麼壓縮

方法如下:

1、首先需要下載一個壓縮工具,打開瀏覽器,找到WinRAR壓縮工具,先下載好,待會用來壓縮文件。

c語言字元串如何壓縮

話說B數組不應該是整形呀,不然不能保存字母了。以下是我的代碼。。。

#include<iostream>

#include<string.h>

#include<stdio.h>

usingnamespacestd;


voidyasuo(chara[],charb[])

{

intcount=1,p=0;

for(inti=0;i<strlen(a);i++)

if(a[i]==a[i+1])

count++;

elseif(count>2)

{

b[p++]=(char)(count+'0');

b[p++]=a[i];

count=1;

}

elseif(count==2)

{

b[p++]=a[i];

b[p++]=a[i];

count=1;

}

else

b[p++]=a[i];

}

voidprintB(charb[])

{

cout<<b<<endl;

}

voidbackB(charb[])

{

for(inti=0;i<strlen(b);i++)

if(b[i]<='9'&&b[i]>='3')

{

for(intj=0;j<(int)(b[i]-'0');j++)

cout<<b[i+1];

i++;

}

else

cout<<b[i];

cout<<endl;

}

intmain()

{

chara[1000]={0},b[1000]={0};

gets(a);

yasuo(a,b);

printB(b);

backB(b);

}

㈢ 怎麼壓縮文件

手機上面可以在文件管理裡面對文件進行壓縮。

以華為手機為例:

1、首先,打開手機,找到手機上面的實用工具。

㈣ 如何用c語言壓縮解壓文件夾

你是想自己寫代碼實現解壓縮的功能,還是只是在代碼中調用命令來解壓,system()找到你的解壓縮工具在加相應的參數

㈤ C語言求助:請編寫一個字元串壓縮程序,將字元串中連續出席的重復字母進行壓縮,並輸出壓縮後的字元串。

#include <stdio.h>

void stringZip(const char

*pInputStr, long lInputLen, char *pOutputStr)

{ int n=1;

char c,*p1=pInputStr,*p2=pOutputStr;

while(*p1)

{

c=*(p1++);

while(*p1==c){n++;p1++;}

if(n>1)

{

if(n>999){*(p2++)=48+n/1000; n/=10;}

if(n>99){*(p2++)=48+n/100; n/=10;}

if(n>9){*(p2++)=48+n/10; n/=10;}

*(p2++)=48+n;

}

*(p2++)=c;

n=1;

}

*p2='';

}

void main()

{ char s1[200],s2[200];

gets(s1);

stringZip(s1,strlen(s1),s2);

puts(s2);

}

熱點內容
手機ea伺服器連不上怎麼辦 發布:2025-05-15 01:35:03 瀏覽:450
資料庫數據插入語句 發布:2025-05-15 01:30:01 瀏覽:871
js是無需編譯直接運行嗎 發布:2025-05-15 01:28:30 瀏覽:476
android文件夾重命名 發布:2025-05-15 01:13:50 瀏覽:481
cns腳本 發布:2025-05-15 01:13:38 瀏覽:722
數據結構與演算法筆試題 發布:2025-05-15 01:04:20 瀏覽:417
搜狗輸入法如何直接編輯配置文件 發布:2025-05-15 00:51:47 瀏覽:668
電箱都有哪些配置 發布:2025-05-15 00:30:21 瀏覽:74
安卓qq邀請碼在哪裡尋找 發布:2025-05-15 00:02:04 瀏覽:35
三菱fx編程口 發布:2025-05-15 00:01:23 瀏覽:810