当前位置:网站首页>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;
}

边栏推荐
- 一篇文章学会er图绘制
- 基于51单片机的温度检测监测报警系统设计
- Console Application
- Product axure9 (English version), prototype design and production pull-down secondary menu
- How to solve CSRF attack in laravel
- Abnormal logic reasoning problem of Huawei software test written test
- . H5 file forgets the database name and uses h5py to print
- Chain tour airship development farmers' world chain tour development land chain tour development
- The eighth experiment of hcip Road
- EXCEL VBA 入门与实用例子
猜你喜欢

如何优雅的快速下载谷歌云盘的大文件 (二)

1278_FreeRTOS_借助prvAddCurrentTaskToDelayedList接口理解delayed task

Akamai-1.75版本-_abck参数生成-js逆向分析

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

The Sandbox 与《足球小将》达成合作,将流行的足球漫画及动画带入元宇宙

C WPF additional attribute implementation interface defines decorator

3DMAX plug-in development environment configuration and fileexport and utilities template testing

《一周的朋友》

User mode and kernel mode
![[cloud computing event] vocational skill competition -- container development example pig rapid development framework](/img/4b/393b5980090330602a501867c60089.png)
[cloud computing event] vocational skill competition -- container development example pig rapid development framework
随机推荐
Operation on a bit of binary
30 sets of report templates necessary for the workplace, meeting 95% of the report needs, and no code is required for one click application
'Latin-1' codec can't encode characters in position 103-115: body ('string of Chinese ') is not valid Latin-1
What is customer experience automation?
Nacos adapts Oracle11g create table DDL statement
NFS 特别注意权限的问题
Yan's DP analysis
Heuristic search strategy
MySQL (IV) - MySQL storage engine
链游飞船开发 农民世界链游开发 土地链游开发
《一周的朋友》
RTMP streaming exception fast recovery scheme
Simpledateformat thread safety issues
SimpleDateFormat 线程安全问题
MySQL (VIII) - explain
G++ compilation command use
[deep learning] [original] how to detect targets and draw map and other parameter maps without yolov5 weights or models
左乘右乘矩阵问题
SSM integration
Minio single node deployment Minio distributed deployment fool deployment process (I)