⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rs_main.c

📁 (31,25)RS码编码以及解码的C程序
💻 C
字号:
#include "stdio.h"
#include "math.h"

#include "RSHeader_encode.h"
#include "RSHeader_decode.h"


void main()
{
	int temp_rec[31]={24,28,14,5,26,23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,23,22,23,24,13};
	int i;
	printf("The data before encode is \n");
	for(i=0;i<25;i++)
	{
		temp_Bencode[i]=i+1;
		printf("%d ",temp_Bencode[i]);
	}
	printf("\n");	

	encode();

	printf("The data after encode is \n");
	for(i=0;i<31;i++)
	{
		printf("%d ",temp_Aencode[i]);
	}
	printf("\n");


	
	printf("The data received is \n");
	for(i=0;i<31;i++)
	{
		printf("%d ",temp_rec[i]);
	}
	printf("\n");
	/*the part of decode*/
	assignValue(temp_Bdecode,temp_rec,31);
	decode();



	printf("the data after decode is \n");
	for(i=0;i<25;i++)
	{
		printf("%d ",temp_Adecode[i]);
	}	
	printf("\n");
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -