矩阵相似问题 pascal

[复制链接]
查看11 | 回复2 | 2013-6-26 21:12:24 | 显示全部楼层 |阅读模式
var n,i,j,k,g,b,c:integer;a:array[1..20,1..20]of integer;beginreadln(n);for i:=1 to 2*n dobeginfor j:=1 to n do
read(a[i,j]);
readln;end;k:=0;g:=0;b:=0;c:=0;for i:=1 to n dofor j:=1 to n do
begin
if a[i,j]=a[i+n,j] then k:=k+1;
if a[i,j]=a[n+j,n+1-i] then g:=g+1;
if a[i,j]=a[2*n+1-i,n+1-j]...
回复

使用道具 举报

千问 | 2013-6-26 21:12:24 | 显示全部楼层
如果有个=,说明这个变量是常量。常量定义如下:const a:array[0..3]of longint=(1,2,3,4);在定义一个常量的时候,要同时赋予它初始值并且该常量不能改变。way[1,1]=1的意思大概是把四个方向分别用四个数字标记,1,2,3,4或者其他。在输出时用来判断。(如果能把程序发一下更好。我没大懂你的way数组)...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行