当前位置:网站首页>Using the for loop to output an alphabetic triangle
Using the for loop to output an alphabetic triangle
2022-06-23 07:41:00 【Advanced vegetable bear】
subject : Programming , utilize for Loop statement outputs the following graph .

#include<stdio.h>
#include<math.h>
int main()
{
int i,j,k=1,m=1;
for(i=1;i<=8;i++)
{
for(j=1;j<16-i;j++)
{
printf(" ");
}
printf("Z ");
for(j=1;j<(k-1)/2;j++)
{
printf("%c ",'Z'-j);
}
for(j=(k-1)/2;j>0;j--)
{
printf("%c ",'Z'-j);
}
if(i==1) printf("\n");
else
printf("Z\n");
k=k+2;
}
return 0;
}

边栏推荐
- csrf攻击在laravel中如何解决
- 'Latin-1' codec can't encode characters in position 103-115: body ('string of Chinese ') is not valid Latin-1
- C WPF realizes dynamic loading of controls through binding
- SSM integration
- EXCEL VBA 入门与实用例子
- HCIP之路第八次实验
- 【唠嗑篇】普通人到底该怎么学技术啊?
- leetcode210. 课程表 II 207. 课程表 拓扑排序 dfs bfs
- WPS for thesis writing installs MathType plug-in to write mathematical formulas
- 【AI实战】机器学习数据处理之数据归一化、标准化
猜你喜欢

Akamai-1.75 version-_ Abck parameter generation JS reverse analysis

【星球精选】如何高效构建 Roam 与 theBrain 间细粒度双向链接?

在kubernetes中部署kubersphere
![[pyqt5 series] modify the counter to realize control](/img/de/c997a19ad72619b0fd2fcd0124ee1a.png)
[pyqt5 series] modify the counter to realize control

Nacos adapts to oracle11g- modify the source code of Nacos

yolov5检测小目标(附源码)

Design of temperature detection and alarm system based on 51 single chip microcomputer

HCIP之路第八次实验

一篇文章学会er图绘制

Make a record of glib2.14 upgrading glib2.18 and the principle of the steps
随机推荐
MySQL (11) - sorting out MySQL interview questions
Basic experiment of data statistics and analysis - basic grammar and operation
电脑如何安装MySQL?
Product axure9 (English version), prototype design and production pull-down secondary menu
Eureka服务注册与发现
Decoding and practice of cmaf Technology
YGG 西班牙 subDAO——Ola GG 正式成立
Abnormal logic reasoning problem of Huawei software test written test
CIRIUM(睿思誉)逐渐成为航空公司二氧化碳排放报告的标准
[cloud computing event] vocational skill competition -- container development example pig rapid development framework
[pyqt5 series] modify the counter to realize control
1278_FreeRTOS_借助prvAddCurrentTaskToDelayedList接口理解delayed task
G++ compilation command use
Online JSON to CSharp (c) class tool
Online text filter less than specified length tool
Nacos adapts to oracle11g- modify the source code of Nacos
How bootstrap clears floating styles
Mysql事务隔离级别
【唠嗑篇】普通人到底该怎么学技术啊?
Akamai-1.75 version-_ Abck parameter generation JS reverse analysis