用c语言编辑文字“晴天”

发布网友 发布时间:2024-10-23 22:20

我来回答

3个回答

热心网友 时间:2024-10-29 23:32

你好!!

    编辑汉字,那就采用点阵字库的方式,读取出点阵

热心网友 时间:2024-10-29 23:29

可以用二维数组,双重循环进行编写啊!

热心网友 时间:2024-10-29 23:28

#include<iostream>
using namespace std;
int main(){
int i,j;
int a[16][16]=
{0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,
0,1,0,0,1,0,1,1,1,1,1,1,1,0,0,0,
0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,
0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,
0,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,
0,1,0,0,1,0,1,1,1,1,1,1,1,1,0,0,
0,1,0,0,1,0,1,0,0,0,0,0,1,0,0,0,
0,1,0,0,1,0,1,1,1,1,1,1,1,0,0,0,
0,1,0,0,1,0,1,0,0,0,0,0,1,0,0,0,
0,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0,
0,1,0,0,1,0,1,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,};
int b[16][16]=
{0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,0,
1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,};
for(i=0;i<16;i++)
{
for(j=0;j<16;j++)
{
if(a[i][j]==1)
cout<<"●";
else
cout<<"○";
}
cout<<endl;
}
cout<<endl;
for(i=0;i<16;i++)
{
for(j=0;j<16;j++)
{
if(b[i][j]==1)
cout<<"●";
else
cout<<"○";
}
cout<<endl;
}
return 0;
}
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com