当前位置:网站首页>Character pyramid
Character pyramid
2022-07-03 08:50:00 【Cap07】
#include<iostream>
#include<string>
using namespace std;
int main() { //1 3 5 7 2n-1
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= 2 * n - 1; j++) {
if (j <= n - i || j > n-1+i)
cout << " ";
else
cout << (char)(i + 64);
}
cout<<""<< endl;
}
return 0;
}
//00100
//02220
//33333
test result :
边栏推荐
- Apache startup failed phpstudy Apache startup failed
- JS ternary operator - learning notes (with cases)
- [rust notes] 11 practical features
- PHP uses foreach to get a value in a two-dimensional associative array (with instances)
- UE4 source code reading_ Bone model and animation system_ Animation node
- UE4 source code reading_ Bone model and animation system_ Animation process
- Deeply understand the underlying data structure of MySQL index
- Cesium for unreal quick start - simple scenario configuration
- Gradle's method of dynamically modifying APK package name
- Unity notes 1
猜你喜欢
Concurrent programming (V) detailed explanation of atomic and unsafe magic classes
Redux - learning notes
[concurrent programming] consistency hash
Query XML documents with XPath
Binary to decimal, decimal to binary
第一个Servlet
记忆化搜索 AcWing 901. 滑雪
22-06-27 西安 redis(01) 安装redis、redis5种常见数据类型的命令
Unity learning notes
Final review of Database Principles
随机推荐
DOM 渲染系统(render mount patch)响应式系统
too many open files解决方案
Unity editor expansion - scrolling list
Dealing with duplicate data in Excel with xlwings
基于SSM的校园失物招领平台,源码,数据库脚本,项目导入运行视频教程,论文撰写教程
[concurrent programming] concurrent security
[rust notes] 08 enumeration and mode
Notes and bugs generated during the use of h:i:s and y-m-d
Deep parsing (picture and text) JVM garbage collector (II)
Collection interface
Gif remove blank frame frame number adjustment
[MySQL] MySQL Performance Optimization Practice: introduction of database lock and index search principle
Osganimation library parsing
Alibaba canal actual combat
Dom4j遍历和更新XML
Unity editor expansion - the framework and context of unity imgui
[concurrent programming] thread foundation and sharing between threads
Unity editor expansion - controls, layouts
[rust notes] 07 structure
Mortgage Calculator