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

边栏推荐
- MySQL获取系统时间段
- CIRIUM(睿思誉)逐渐成为航空公司二氧化碳排放报告的标准
- [Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?
- Pagoda forgot password
- Here comes the dry goods | PAAS collection to see first ~
- Make a record of glib2.14 upgrading glib2.18 and the principle of the steps
- Minio single node deployment Minio distributed deployment fool deployment process (I)
- Online JSON to CSharp (c) class tool
- 这道字符串反转的题目,你能想到更好的方法吗?
- Principle of skip table
猜你喜欢

Both are hard disk partitions. What is the difference between C disk and D disk?

The original cloud landed in deep water, and the cloud product family of Boyun container released four values

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

YGG 西班牙 subDAO——Ola GG 正式成立

User mode and kernel mode

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

C WPF additional attribute implementation interface defines decorator

Pagoda forgot password
![[Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?](/img/ee/ce9f55694b28c391eb07cb11298caf.jpg)
[Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?

Intelligence Education - how to merge codes when code conflicts occur in multi person collaborative development?
随机推荐
Product axure9 (English version), prototype design and production pull-down secondary menu
一篇文章学会er图绘制
EXCEL VBA 入门与实用例子
RTMP streaming exception fast recovery scheme
Yolov5 detecting small targets (with source code)
MySQL on duplicate key and PgSQL on conflict (primary key) handle primary key conflicts
左乘右乘矩阵问题
Akamai-1.75版本-_abck参数生成-js逆向分析
传智教育 | 项目发布前如何打tag标签及标签命名规范
Online text filter less than specified length tool
RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check
279. perfect square
Eureka service registration and discovery
Principle of skip table
char和varchar区别
Decoding and practice of cmaf Technology
【Veusz】导入CSV中的二维数据
Spock sub piling
[Laoke] how should ordinary people learn technology?
The original cloud landed in deep water, and the cloud product family of Boyun container released four values