当前位置:网站首页>Print diamond pattern
Print diamond pattern
2022-07-04 00:41:00 【CTGU-Yoghurt】
subject :
Code details :
#include <stdio.h>
#include "math.h"
void fun(int i)
{
int m, n;
/**********Program**********/
for (n = i; abs(n) <= i; n--)// Control by decreasing the number and the absolute value of the number
{
for (m = 0; m <= abs(n); m++)// Number of spaces output
{
printf(" ");
}
for (m = 0; m <= (i - abs(n))*2; m++)// Output * Count
{
printf("*");
}
printf("\n");
}
/********** End **********/
}
int main()
{
int n;
scanf("%d", &n);
fun(n);
}
PS: Water blog .
边栏推荐
- [common error] UART cannot receive data error
- MySQL is installed as a Windows Service
- Axure resources and prototype tool Axure RP 9 download
- From functools import reduce -- see the use of reduce function from typical examples
- Subgraph isomorphism -subgraph isomorphism
- Global and Chinese markets of distributed control system (DCS) consumption 2022-2028: Research Report on technology, participants, trends, market size and share
- [complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!
- 功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
- 1214 print diamond
- Employees' turnover intention is under the control of the company. After the dispute, the monitoring system developer quietly removed the relevant services
猜你喜欢

A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders
![[prefix and notes] prefix and introduction and use](/img/a6/a75e287ac481559d8f733e6ca3e59c.jpg)
[prefix and notes] prefix and introduction and use

Detailed explanation of the relationship between Zhongtai, wechat and DDD

On covariance of array and wildcard of generic type

Unity elementary case notes of angry birds Siki college 1-6

Interview script of Software Test Engineer
![[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!](/img/28/fc05f2e8d53cf81fd061c799090022.jpg)
[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!

Similarities and differences of text similarity between Jaccard and cosine

Qtcharts notes (V) scatter diagram qscatterseries

功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
随机推荐
Pair
Weekly open source project recommendation plan
功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
2022 Software Test Engineer skill list, please check
What are the application fields of digital twins in industry?
Arc 135 supplementary report
GUI 应用:socket 网络聊天室
Regular expressions and text processors for shell programming
The first training of wechat applet
我管你什么okr还是kpi,PPT轻松交给你
Global and Chinese market of melting furnaces 2022-2028: Research Report on technology, participants, trends, market size and share
不得不会的Oracle数据库知识点(三)
@EnableAsync @Async
机器学习基础:用 Lasso 做特征选择
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
Bodong medical sprint Hong Kong stocks: a 9-month loss of 200million Hillhouse and Philips are shareholders
[GNN] hard core! This paper combs the classical graph network model
Generic
system. Exit (0) and system exit(1)
[C language] break and continue in switch statement