当前位置:网站首页>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 .
边栏推荐
- What is the potential of pocket network, which is favored by well-known investors?
- [PHP basics] session basic knowledge, application case code and attack and defense
- Global and Chinese market of process beer equipment 2022-2028: Research Report on technology, participants, trends, market size and share
- Introduction to thread pool
- Optimization of for loop
- P1339 [USACO09OCT]Heat Wave G
- [PHP basics] cookie basics, application case code and attack and defense
- Alibaba test engineer with an annual salary of 500000 shares notes: a complete set of written tests of software testing
- [error record] configure NDK header file path in Visual Studio (three header file paths of NDK | ASM header file path selection related to CPU architecture)
- Is the securities account opened by Caicai for individuals safe? Is there a routine
猜你喜欢
1-Redis架构设计到使用场景-四种部署运行模式(上)
A-Frame虚拟现实开发入门
NLP Chinese corpus project: large scale Chinese natural language processing corpus
[common error] UART cannot receive data error
[error record] configure NDK header file path in Visual Studio (three header file paths of NDK | ASM header file path selection related to CPU architecture)
Recommendation of knowledge base management system
Alibaba test engineer with an annual salary of 500000 shares notes: a complete set of written tests of software testing
Data mining vs Machine Learning: what is the difference between them? Which is more suitable for you to learn
The super fully automated test learning materials sorted out after a long talk with a Tencent eight year old test all night! (full of dry goods
我管你什么okr还是kpi,PPT轻松交给你
随机推荐
A method to solve Bert long text matching
MySQL 8.0.12 error: error 2013 (HY000): lost connection to MySQL server during query
Software testers, how can you quickly improve your testing skills? Ten minutes to teach you
A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders
1214 print diamond
[software testing] you haven't mastered these real interview questions of big companies?
Sorry, Tencent I also refused
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
AI Challenger 2018 text mining competition related solutions and code summary
A dichotomy of Valentine's Day
2022 Software Test Engineer skill list, please check
Network layer - routing
Is user authentication really simple
不得不会的Oracle数据库知识点(三)
On covariance of array and wildcard of generic type
GUI 应用:socket 网络聊天室
UTS | causal reasoning random intervention based on Reinforcement Learning
What is the potential of pocket network, which is favored by well-known investors?
How to be a professional software testing engineer? Listen to the byte five year old test
Pair