C语言软件综合-大气数据处理

平台

我选择VScode,嫌麻烦可以6.0
VScode官方下载地址

VScode搭建c语言环境参考文章

VS code搭建C环境
vscode 配置 C/C++ 编译环境 教程

界面设计

取模软件设置

横向取模

实例

#include <stdio.h>

int main(void)
{
	int i, j, k, testBit;
	char dzBuf[35][5]= // dzBuf[高度][宽度/8]
	{
		/*--  文字:  库  --*/
		/*--  宋体26;  此字体下对应的点阵为:宽x高=35x35   --*/
		/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,
		0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,
		0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,
		0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xC0,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,
		0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xF0,0x00,0x00,0x00,0x01,0xF0,0x00,0x00,
		0x00,0x01,0xF0,0x00,0x00,0x00,0x03,0xF8,0x00,0x00,0x00,0x03,0xD8,0x00,0x00,0x00,
		0x03,0x9C,0x00,0x00,0x00,0x07,0x9C,0x00,0x00,0x00,0x07,0x8E,0x00,0x00,0x00,0x07,
		0x07,0x00,0x00,0x00,0x0F,0x07,0x80,0x00,0x00,0x1E,0x03,0x80,0x00,0x00,0x1C,0x01,
		0xE0,0x00,0x00,0x3C,0x01,0xF0,0x00,0x00,0x78,0x00,0xFC,0x00,0x01,0xE0,0x00,0x7F,
		0x00,0x03,0xC0,0x00,0x3F,0xC0,0x0F,0x80,0x00,0x1F,0x80,0x1E,0x00,0x00,0x06,0x00,
		0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
	};	

	for (i = 0; i < 35; i++) //高度
	{		
		for(j = 0; j < 5; j++) //宽度/8
		{
			testBit = 0x80;    // 从最左边1位,即第7位开始测试 
			for (k = 0; k < 8; k++)
			{

				if (dzBuf[i][j] & testBit)  //测试相应位是否为1 
				{
					printf("**"); 
				}
				else
				{
					printf("  ");
				}
				testBit >>= 1;  /* 处理完当前位后,准备右边下一位测试处理 */
			}			
		}
		printf("\n");
	}
	getch();
	return 0;
}

在这里插入图片描述

应用

#include <stdio.h>

int main(void)
{
	int a, i, j, k, testBit;
	char dzBuf1[5][35][5]={
/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,
		0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,
		0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,
		0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xC0,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xE0,0x00,
		0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,0xF0,0x00,0x00,0x00,0x01,0xF0,0x00,0x00,
		0x00,0x01,0xF0,0x00,0x00,0x00,0x03,0xF8,0x00,0x00,0x00,0x03,0xD8,0x00,0x00,0x00,
		0x03,0x9C,0x00,0x00,0x00,0x07,0x9C,0x00,0x00,0x00,0x07,0x8E,0x00,0x00,0x00,0x07,
		0x07,0x00,0x00,0x00,0x0F,0x07,0x80,0x00,0x00,0x1E,0x03,0x80,0x00,0x00,0x1C,0x01,
		0xE0,0x00,0x00,0x3C,0x01,0xF0,0x00,0x00,0x78,0x00,0xFC,0x00,0x01,0xE0,0x00,0x7F,
		0x00,0x03,0xC0,0x00,0x3F,0xC0,0x0F,0x80,0x00,0x1F,0x80,0x1E,0x00,0x00,0x06,0x00,
		0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
	// };	
	// char dzBuf2[35][5]={
/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		/*--  文字:  气  --*/
/*--  宋体26;  此字体下对应的点阵为:宽x高=35x35   --*/
/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		{0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,
		0xF0,0x00,0x00,0x00,0x00,0xF0,0x00,0x18,0x00,0x01,0xE0,0x00,0x3C,0x00,0x01,0xFF,
		0xFF,0xFE,0x00,0x03,0xC0,0x00,0x00,0x00,0x03,0x80,0x00,0x40,0x00,0x07,0x80,0x00,
		0xE0,0x00,0x07,0x7F,0xFF,0xF0,0x00,0x0E,0x30,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
		0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x01,0xC0,0x00,0x77,0xFF,0xFF,0xE0,0x00,
		0x03,0x80,0x01,0xC0,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,
		0x00,0x01,0xC0,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,
		0x01,0xC0,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x01,
		0xE3,0x80,0x00,0x00,0x00,0xE3,0x80,0x00,0x00,0x00,0xF3,0x80,0x00,0x00,0x00,0xF3,
		0x80,0x00,0x00,0x00,0x7F,0x80,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x00,0x1F,0x80,
		0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},


	// };	
	// char dzBuf3[35][5]={
/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		/*--  文字:  数  --*/
/*--  宋体26;  此字体下对应的点阵为:宽x高=35x35   --*/
/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		{0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x07,0x00,0x00,0x00,0x3C,0x87,0xC0,0x00,0x0C,
		0x39,0xE7,0x80,0x00,0x0F,0x39,0xE7,0x00,0x00,0x07,0x39,0xCF,0x00,0x00,0x07,0xBB,
		0x8F,0x00,0x00,0x07,0xBB,0x0E,0x00,0x00,0x03,0xBE,0xCE,0x03,0x00,0x00,0x3D,0xFE,
		0x07,0x80,0x3F,0xFF,0xFF,0xFF,0xC0,0x18,0xF8,0x1C,0x1C,0x00,0x00,0xFE,0x3C,0x1C,
		0x00,0x01,0xFF,0xBC,0x1C,0x00,0x03,0xBF,0xBE,0x3C,0x00,0x07,0x3B,0xFE,0x3C,0x00,
		0x0E,0x39,0xE6,0x3C,0x00,0x3C,0x38,0xC6,0x38,0x00,0x70,0x70,0xC6,0x38,0x00,0x00,
		0xF8,0x07,0x38,0x00,0x00,0xF1,0x87,0x78,0x00,0x3F,0xFF,0xC7,0x78,0x00,0x19,0xE3,
		0xC3,0xF0,0x00,0x01,0xC7,0x83,0xF0,0x00,0x03,0x87,0x03,0xF0,0x00,0x03,0xCF,0x01,
		0xE0,0x00,0x01,0xFE,0x03,0xE0,0x00,0x00,0x3F,0xC7,0xF0,0x00,0x00,0x7F,0xCF,0xF8,
		0x00,0x00,0xF1,0xFE,0x3E,0x00,0x03,0xC0,0xFC,0x1F,0x80,0x0F,0x00,0xF8,0x0F,0xC0,
		0x7C,0x01,0xE0,0x07,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
	// };	
	// char dzBuf4[35][5]={
				/*--  文字:  据  --*/
		/*--  宋体26;  此字体下对应的点阵为:宽x高=35x35   --*/
		/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x03,
		0xE3,0x80,0x0E,0x00,0x03,0xC3,0xFF,0xFF,0x00,0x03,0xC3,0xC0,0x0E,0x00,0x03,0xC3,
		0xC0,0x0E,0x00,0x03,0xC3,0xC0,0x0E,0x00,0x03,0xCB,0xC0,0x0E,0x00,0x03,0xDF,0xC0,
		0x0E,0x00,0x7F,0xFF,0xFF,0xFE,0x00,0x33,0xC3,0xC3,0x8E,0x00,0x03,0xC3,0xC3,0xCC,
		0x00,0x03,0xC3,0x83,0x80,0x00,0x03,0xC7,0x83,0x80,0x00,0x03,0xDF,0x83,0x87,0x00,
		0x03,0xFB,0xFF,0xFF,0x80,0x03,0xF3,0x83,0x80,0x00,0x07,0xC3,0x83,0x80,0x00,0x1F,
		0xC3,0x83,0x80,0x00,0x7F,0xC7,0x83,0x80,0x00,0x7F,0xC7,0x03,0x80,0x00,0x3B,0xC7,
		0xE3,0x8E,0x00,0x03,0xC7,0xFF,0xFF,0x00,0x03,0xCE,0xF0,0x0E,0x00,0x03,0xCE,0xF0,
		0x0E,0x00,0x03,0xCE,0xF0,0x0E,0x00,0x03,0xDC,0xF0,0x0E,0x00,0x03,0xDC,0xF0,0x0E,
		0x00,0x03,0xF8,0xF0,0x0E,0x00,0x3F,0xF0,0xFF,0xFE,0x00,0x0F,0xF0,0xF0,0x0E,0x00,
		0x07,0xE0,0xF0,0x0E,0x00,0x00,0x00,0xE0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},
	// };	
	// char dzBuf5[35][5]={
		/*--  文字:  库  --*/
		/*--  宋体26;  此字体下对应的点阵为:宽x高=35x35   --*/
		/*--  宽度不是8的倍数,现调整为:宽度x高度=40x35  --*/
		{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,
		0x00,0x78,0x00,0x00,0x00,0x00,0x78,0x06,0x00,0x06,0x00,0x30,0x0F,0x00,0x07,0xFF,
		0xFF,0xFF,0x80,0x07,0x01,0xC0,0x00,0x00,0x07,0x01,0xE0,0x00,0x00,0x07,0x01,0xE0,
		0x00,0x00,0x07,0x01,0xC0,0x0C,0x00,0x07,0x03,0xC0,0x1E,0x00,0x07,0xFF,0xFF,0xFF,
		0x00,0x07,0x63,0x80,0x00,0x00,0x07,0x07,0x80,0x00,0x00,0x07,0x07,0x1C,0x00,0x00,
		0x07,0x07,0x1E,0x00,0x00,0x07,0x0E,0x1C,0x00,0x00,0x07,0x0E,0x1C,0x30,0x00,0x07,
		0x1E,0x1C,0x78,0x00,0x0F,0x3F,0xFF,0xFC,0x00,0x0F,0x1C,0x1C,0x00,0x00,0x0F,0x00,
		0x1C,0x00,0x00,0x0E,0x00,0x1C,0x06,0x00,0x0E,0x00,0x1C,0x0F,0x00,0x0F,0xFF,0xFF,
		0xFF,0x80,0x0E,0xE0,0x1C,0x00,0x00,0x1C,0x00,0x1C,0x00,0x00,0x1C,0x00,0x1C,0x00,
		0x00,0x18,0x00,0x1C,0x00,0x00,0x38,0x00,0x1C,0x00,0x00,0x30,0x00,0x1C,0x00,0x00,
		0x70,0x00,0x1C,0x00,0x00,0x60,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00}


	};	

	for(a=0; a<5; a++)
	{
		for (i = 0; i < 35; i++)
		{		
			for(j = 0; j < 5; j++)
			{
				testBit = 0x80;    // 从最左边1位,即第7位开始测试 
				for (k = 0; k < 8; k++)
				{

					if (dzBuf1[a][i][j] & testBit)  //测试相应位是否为1 
					{
						printf("**"); 
					}
					else
					{
						printf("  ");
					}
					testBit >>= 1;  /* 处理完当前位后,准备右边下一位测试处理 */
				}			
			}
			printf("\n");
			
		}

		Sleep(800);
		system("cls");
	}
	for(i=0; i<3; i++)
	{
		printf("\n");
	}

	for (i=0; i<35; i++)
	{
		printf("->");
		Sleep(50);
	}
	getch();
	return 0;
}


批处理

**help [命令]**就能在cmd里面看到解释

echo

显示消息,或者启用或关闭命令回显。

ECHO [ON | OFF]
ECHO [message]

若要显示当前回显设置,请键入不带参数的 ECHO。

rd

删除一个目录。

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S      除目录本身外,还将删除指定目录下的所有子目录和
        文件。用于删除目录树。

/Q      安静模式,带 /S 删除目录树时不要求确认

md

创建目录。

MKDIR [drive:]path
MD [drive:]path

如果命令扩展被启用,MKDIR 会如下改变:

如果需要,MKDIR 会在路径中创建中级目录。例如: 假设 \a 不
存在,那么:

mkdir \a\b\c\d

与:

mkdir \a
chdir \a
mkdir b
chdir b
mkdir c
chdir c
mkdir d

相同。如果扩展被停用,则需要键入 mkdir \a\b\c\d。

copy

将一份或多份文件复制到另一个位置。

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/L] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ …]] [destination [/A | /B]]

source 指定要复制的文件。
/A 表示一个 ASCII 文本文件。
/B 表示一个二进位文件。
/D 允许解密要创建的目标文件
destination 为新文件指定目录和/或文件名。
/V 验证新文件写入是否正确。
/N 复制带有非 8dot3 名称的文件时,
尽可能使用短文件名。
/Y 不使用确认是否要覆盖现有目标文件
的提示。
/-Y 使用确认是否要覆盖现有目标文件
的提示。
/Z 用可重新启动模式复制已联网的文件。
/L 如果源是符号链接,请将链接复制
到目标而不是源链接指向的实际文件。

命令行开关 /Y 可以在 COPYCMD 环境变量中预先设定。
这可能会被命令行上的 /-Y 替代。除非 COPY
命令是在一个批处理脚本中执行的,默认值应为
在覆盖时进行提示。

要附加文件,请为目标指定一个文件,为源指定
数个文件(用通配符或 file1+file2+file3 格式)。

tree

以图形显示驱动器或路径的文件夹结构。

TREE [drive:][path] [/F] [/A]

/F 显示每个文件夹中文件的名称。
/A 使用 ASCII 字符,而不使用扩展字符。

pause

暂停批处理程序,并显示以下消息:
请按任意键继续. . .

VScode安装绘图的库

参考文章,认真按照
VS Code成功安装ege图形库(踩坑到成功运行示例代码)
不止要看他的总结,还要看一些他解决问题的办法,如果嫌麻烦还是选择vc6.0加easyx吧。

问题

VScode输出中文乱码

参考这篇文章解决vs code解决C/C++控制台中文乱码。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值