c++实现拉丁方阵
来源:互联网 发布:搜狐下载软件 编辑:程序博客网 时间:2024/04/28 19:50
构造
1
2
3
4
若将每
#include
using namespace std;
int main()
{
int n;
cout << "please input num "<<endl;
cin >> n;
if(n<2&&n>9){
cout << "exit";
exit(0);
}
int * nums =new int[n];
for(int i = 1; i <= n; i++){
nums[i-1]=i;
}
for(int t = 0; t < n; t++){
for(int i = t; i < (n+t); i++){
if(i >= n){
cout << nums[i%n]<<" ";
}
else
cout << nums[i]<<" ";
}
cout << endl;
}
}
运行结果为:
- 拉丁方阵C实现
- c++实现拉丁方阵
- c++实现拉丁方阵
- 编程实现拉丁方阵。
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 拉丁方阵
- 生成拉丁方阵的完整C代码
- C循环链表拉丁方阵问题
- 拉丁方阵(单循环链表实现)
- c语言编程构造拉丁方阵和正交拉丁方阵组
- 搞ACM的你伤不起(挺好玩的。嘿)
- 如何降低ubuntu10.04的gcc版本,在两个版本之间切换
- Struts2: Request & Response
- QSetting 读写配置文件
- 软考复习
- c++实现拉丁方阵
- 第五周项目四学生类(指针)
- 冒泡排序详解
- CppUnit 使用指南
- @TableGenerator
- Android平台软件体系浅注
- UVA 11889 Benefit(公约公倍)
- 【达达】写在清明节之前
- 多线程火车票售票系统——互斥对象实现线程同步