当前位置:网站首页>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 :
边栏推荐
- Gradle's method of dynamically modifying APK package name
- First Servlet
- Deep parsing (picture and text) JVM garbage collector (II)
- JS ternary operator - learning notes (with cases)
- Gif remove blank frame frame number adjustment
- 请求参数的发送和接收
- 单调栈-503. 下一个更大元素 II
- [MySQL] MySQL Performance Optimization Practice: introduction of database lock and index search principle
- MySQL index types B-tree and hash
- Phpstudy 80 port occupied W10 system
猜你喜欢
注解简化配置与启动时加载
Graphics_ Games101/202 learning notes
UE4 source code reading_ Bone model and animation system_ Animation compression
基于SSM的校园失物招领平台,源码,数据库脚本,项目导入运行视频教程,论文撰写教程
[concurrent programming] Table hopping and blocking queue
Life cycle of Servlet
I made mistakes that junior programmers all over the world would make, and I also made mistakes that I shouldn't have made
Allocation exception Servlet
Phpstudy 80 port occupied W10 system
JS non Boolean operation - learning notes
随机推荐
100 GIS practical application cases (78) - Multi compliance database design and data warehousing
Alibaba canal actual combat
22-06-27 Xian redis (01) commands for installing five common data types: redis and redis
基于SSM的校园失物招领平台,源码,数据库脚本,项目导入运行视频教程,论文撰写教程
单调栈-503. 下一个更大元素 II
Final review of Database Principles
Concurrent programming (VI) ABA problems and solutions under CAS
Explain sizeof, strlen, pointer, array and other combination questions in detail
Really explain the five data structures of redis
Pit & ADB wireless debugging of vivo real machine debugging
【Rust 笔记】10-操作符重载
Markdown learning
Osganimation library parsing
TP5 multi condition sorting
Unity Editor Extension - drag and drop
Redux - learning notes
Graphics_ Games101/202 learning notes
Downward compatibility and upward compatibility
UE4 source code reading_ Bone model and animation system_ Animation node
数据库原理期末复习