当前位置:网站首页>打印菱形图案
打印菱形图案
2022-07-04 00:34:00 【CTGU-Yoghurt】
题目:
代码详解:
#include <stdio.h>
#include "math.h"
void fun(int i)
{
int m, n;
/**********Program**********/
for (n = i; abs(n) <= i; n--)//通过数字的递减和数字的绝对值来控制
{
for (m = 0; m <= abs(n); m++)//输出的空格数
{
printf(" ");
}
for (m = 0; m <= (i - abs(n))*2; m++)//输出的*数
{
printf("*");
}
printf("\n");
}
/********** End **********/
}
int main()
{
int n;
scanf("%d", &n);
fun(n);
}
PS:水博客。
边栏推荐
- Global and Chinese markets of distributed control system (DCS) consumption 2022-2028: Research Report on technology, participants, trends, market size and share
- Pair
- Gossip about redis source code 76
- 【leetcode】374. Guess the size of the number
- [cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept
- [GNN] hard core! This paper combs the classical graph network model
- 2022 Software Test Engineer skill list, please check
- Suggestions for improving code quality
- (Introduction to database system | Wang Shan) Chapter V database integrity: Exercises
- Struct in linked list
猜你喜欢
![[GNN] hard core! This paper combs the classical graph network model](/img/a7/2140744ebad9f1dc0a609254cc618e.jpg)
[GNN] hard core! This paper combs the classical graph network model
![[2021]NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections](/img/c6/3dc7d01600f6713afdbb4cf3df5238.jpg)
[2021]NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections

Analysis on the scale of China's smart health industry and prediction report on the investment trend of the 14th five year plan 2022-2028 Edition

Report on the construction and development mode and investment mode of sponge cities in China 2022-2028

It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something

SPI based on firmware library
![[CSDN Q & A] experience and suggestions](/img/db/dff3173dda24ca5740729b54a81153.jpg)
[CSDN Q & A] experience and suggestions

Regular expressions and text processors for shell programming

(Video + graphics and text) introduction to machine learning series - Chapter 4 naive Bayes
![[PHP basics] session basic knowledge, application case code and attack and defense](/img/f5/713d7044a693ef23e3fbb1ff9bc9f4.jpg)
[PHP basics] session basic knowledge, application case code and attack and defense
随机推荐
Selenium library 4.5.0 keyword explanation (II)
Selenium library 4.5.0 keyword explanation (III)
Suggestions for improving code quality
A method to solve Bert long text matching
What is the potential of pocket network, which is favored by well-known investors?
Version rollback revert don't reset better reset must be forced
NLP Chinese corpus project: large scale Chinese natural language processing corpus
Smart fan system based on stm32f407
Investment demand and income forecast report of China's building ceramics industry, 2022-2028
STM32 GPIO CSDN creative punch in
P1339 [USACO09OCT]Heat Wave G
Gossip about redis source code 77
Data mining vs Machine Learning: what is the difference between them? Which is more suitable for you to learn
2020.2.14
Gossip about redis source code 80
MySQL is installed as a Windows Service
Subgraph isomorphism -subgraph isomorphism
(Introduction to database system | Wang Shan) Chapter V database integrity: Exercises
[C language] break and continue in switch statement
I would like to ask how the top ten securities firms open accounts? Is it safe to open an account online?