How to construct a DiamondOfNumbers
来源:互联网 发布:考勤软件侵犯隐私 编辑:程序博客网 时间:2024/05/29 09:19
Like this:
We may use the transform thought to solve this problem
#include <iostream> using namespace std; int main() { int Num; cout << "Enter any number in the range of 1 to 9 : ";cin >> Num;if(Num >= 1 && Num <= 9){for(int Y=-Num;Y!=Num;Y++){ if(Y!=0){for(int X=1;X!=(Y<0?-Y:Y+1);X++)printf(" ");for( X=-(Y<0?Num+Y+1:Num-Y);X!=(Y<0?Num+Y+1:Num-Y);X++)if(X!=0)printf("%d",(X<0?-X:X+1));printf("\n");}}}elseprintf("Sorry, limit exceeded. Try again.");return 0; }
- How to construct a DiamondOfNumbers
- How to construct a Hopfield network
- how to construct xml structure
- 怎样构建一个GIT服务器(How to Construct A GIT Server)
- How to construct/destruct before/after main()
- 论文阅读:How to Construct Deep Recurrent Neural Networks
- How to write a Makefile
- How to write a Makefile
- how to write a makefile
- how to become a hacker
- How to Become a Hacker
- How to Read a Paper
- How To Build a Yacc
- How To Build a Yacc
- How To Become A Hacker
- How to Become a Hacker
- How to become a programmer
- How to Create a Customer
- 列出对象锁(lock)信息及其被杀的会话(sid,serial#)信息
- asp.net清除缓存
- C#中如何比较2个string类型的日期大小?
- 图片上传前预览
- 模拟大数据的方法,制造大数据的sql语句
- How to construct a DiamondOfNumbers
- 图片上传前预览
- 分布式学习值观念改变
- Khan公开课 - 统计学学习笔记:(七)伯努利分布、置信区间、t分布、p-value和第一型错误
- java 序列化
- java.util.concurrent(JUC)的研究--》atomic原子操作--》CAS操作
- Hdu-3926 Hand in Hand
- android timed gpio (linux 3.0.0) 受时钟控制的gpio
- KMP算法详解