当前位置:网站首页>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 .
边栏推荐
- Collation of the most complete Chinese naturallanguageprocessing data sets, platforms and tools
- A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders
- 功能:编写函数fun求s=1^k+2^k +3^k + ......+N^k的值, (1的K次方到N的K次方的累加和)。
- AI Challenger 2018 text mining competition related solutions and code summary
- 关于 uintptr_t和intptr_t 类型
- Att & CK actual combat series - red team actual combat - V
- (Video + graphics and text) introduction to machine learning series - Chapter 4 naive Bayes
- Axure resources and prototype tool Axure RP 9 download
- [2021]NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections
- P1339 [USACO09OCT]Heat Wave G
猜你喜欢

Regular expressions and text processors for shell programming

Collation of the most complete Chinese naturallanguageprocessing data sets, platforms and tools

Recommendation of knowledge base management system

Employees' turnover intention is under the control of the company. After the dispute, the monitoring system developer quietly removed the relevant services

功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。

Reading notes on how programs run

BBS forum recommendation

(Video + graphics and text) introduction to machine learning series - Chapter 4 naive Bayes

A-Frame虚拟现实开发入门

功能:编写函数fun求s=1^k+2^k +3^k + ......+N^k的值, (1的K次方到N的K次方的累加和)。
随机推荐
ISBN number
A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders
Future source code view -juc series
Suggestions for improving code quality
MPLS experiment
It is worthy of "Alibaba internal software test interview notes" from beginning to end, all of which are essence
Similarities and differences of text similarity between Jaccard and cosine
swagger中响应参数为Boolean或是integer如何设置响应描述信息
Cannot build artifact 'test Web: War expanded' because it is included into a circular depend solution
Leetcode 121 best time to buy and sell stock (simple)
What is the future of software testing industry? Listen to the test veterans' answers
[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
机器学习基础:用 Lasso 做特征选择
Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
网上的低佣金链接安全吗?招商证券怎么开户?
Social network analysis -social network analysis
功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
Global and Chinese markets for blood and liquid heating devices 2022-2028: Research Report on technology, participants, trends, market size and share
Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience