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

怎麼壓縮字母

發布時間: 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);

}

熱點內容
小君直播密碼是多少 發布:2025-09-16 09:25:46 瀏覽:598
用中文編譯的編程軟體 發布:2025-09-16 09:04:37 瀏覽:142
語音編譯器教程 發布:2025-09-16 08:57:44 瀏覽:447
sql注冊伺服器 發布:2025-09-16 08:53:17 瀏覽:610
嵌入式linuxc編程入門 發布:2025-09-16 08:24:18 瀏覽:382
碼片編程器 發布:2025-09-16 08:24:08 瀏覽:951
原神各畫質要什麼配置 發布:2025-09-16 08:17:32 瀏覽:320
讀取資料庫生成xml 發布:2025-09-16 08:17:19 瀏覽:797
sql2000開發版 發布:2025-09-16 07:56:31 瀏覽:807
linux桌面哪個 發布:2025-09-16 07:55:35 瀏覽:60