九九矩阵
来源:互联网 发布:免费数据接口api平台 编辑:程序博客网 时间:2024/04/27 15:18
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
//九九矩阵
int[,] arr = new int[9, 9];
for (int i = 0; i < arr.GetLength(0); i++)
{
for (int j = 0; j <arr.GetLength(1); j++)
{
if (i == j||i + j == 8)
arr[i, j] = 1;
else arr[i,j]=0;
{
Console.Write("{0}", arr[i, j]);
}
}
Console.WriteLine();
} Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
//九九矩阵
int[,] arr = new int[9, 9];
for (int i = 0; i < arr.GetLength(0); i++)
{
for (int j = 0; j <arr.GetLength(1); j++)
{
if (i == j||i + j == 8)
arr[i, j] = 1;
else arr[i,j]=0;
{
Console.Write("{0}", arr[i, j]);
}
}
Console.WriteLine();
} Console.ReadLine();
}
}
}
0 0
- 九九矩阵
- 九九矩阵
- 九九矩阵
- 九
- 九
- 九度1164 旋转矩阵
- 九度-1164 旋转矩阵
- 【九度OJ】1001【矩阵】
- 九度1081矩阵二分法
- 九九
- 九九
- 九度OJ 题目1191:矩阵最大值
- 九度OJ 题目1180:对称矩阵
- 九度&题目1180:对称矩阵
- 题目1391:顺时针打印矩阵-九度
- 九度OJ 1164 旋转矩阵
- 九度OJ 1139 最大子矩阵
- 九度 题目1391:顺时针打印矩阵
- android DDMS找不到设备
- ”Microsoft Office Professional Plus在安装过程中出错“解决办法
- 有些累了~
- 黑马程序员——C语言函数及多文件团队开发
- yii中添加验证码
- 九九矩阵
- 添用户报错:useradd:警告:此主目录已经存在
- Java把excel中数据读入到数据库中
- Android开发之Intent.Action
- window7 iis 连接access报错Microsoft.Jet.OLEDB.4.0
- IT_启程之路:单选框得到选中索引问题
- Android Fragment 真正的完全解析(下)
- 传感器网络与无线自组网的区别
- java final和static关键字学习