当前位置:网站首页>The first day of C language daily question
The first day of C language daily question
2022-04-22 03:13:00 【Hair is not as much as code】
#define _CRT_SECURE_NO_WARNINGS 1
#define N 5
#include<stdio.h>
int main()
{
int i, j, k; // Define three variables ( In fact, it won't take so much , Two will do )
for (i = 0; i < N; i++) //N by 5, Just print five lines
{
for (j = 0; j < N-i; j++) // j<N-i Is to print spaces on each line first line 5 A space The second line has four The third line three The fourth line has four The fifth line is a space
printf(" ");
for (j = 0; j <= i; j++)
printf("%c", (char)('A' + j)); // After typing the space in each line , No newline , Then type characters , The cast is used here ,'A'+1='B', Notice that here are the characters B
for (k = i; k; k--)
printf("%c", (char)('A' + k-1)); // The flashback character is printed here , The reason for subtracting one here , To avoid printing something like :ABBA, This is the case
printf("\n"); // Wrap after printing
}
return 0;

版权声明
本文为[Hair is not as much as code]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211352336429.html
边栏推荐
- 72. 编辑距离
- 外包干了四年,废了
- Rasa dialogue robot serial 1 lesson 121: the whole process demonstration of e-commerce retail dialogue robot operation process debugging of Rasa dialogue robot debugging project - 1
- 剑指offer 专项突破版 93、最长斐波那契数列
- Interpretation of Flink's new features of fine-grained resource management
- Programmer's essential toolbox
- Performance test and comparison of oceanbase and MariaDB using dbt-3
- ESP32_ GPIO input, output and interrupt
- moudle中的activity跳转到主项目的activity
- [wustctf2020] plain
猜你喜欢

How to use explicit waiting and implicit waiting in web automation testing?

Record your first web automation test case
![[wustctf2020] plain](/img/7f/db81436e898dd2e5af08e57a5024bf.png)
[wustctf2020] plain

Flutter04-Widget初体验

Writing method of JSS in material UI (notes)

微信JSAPI支付方式与错误(当前页面的URL未注册,支付验证签名失败)

Comparison of hex, Base64 and URLEncode coding schemes

C language to achieve three chess

After four years of outsourcing, it was abandoned

Go language practice ------ 31 ------ live broadcast architecture and audio and video call of streaming media architecture design (common streaming media protocol interpretation)
随机推荐
golang依赖注入wire使用 执行wire命令时报错:bash: wire: command not found
Promise me not to empty if (obj = null)
Ros2 learning notes (6) -- customized messages and services, control instruction optimization and online map change
TestNG learning notes
c语言课程设计——基于链表的考场排位系统
Inline temporary variables of code refactoring to replace temporary variables with queries
kerberos認證協議
[laravel series 4.7] connect redis and cache applications
源代码加密产品指南
Testng学习笔记
leetcode:297. 二叉树的序列化与反序列化
go语言实战-----31-----流媒体架构设计之直播架构、音视频通话(常见 流媒体协议 解释)
Technology sharing | selenium test case writing
终于看清阿里,美团,京东这些企业的真面目了
二十四.类的深拷贝与浅拷贝
水洞的类型
二十五.模块/内置模块/模块的安装
Joint primary key and composite primary key creation of Oracle
Use xamarin to write a beautiful app login and registration interface
Saas.数据隔离持久化方案