当前位置:网站首页>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 .
边栏推荐
- PMP 考试常见工具与技术点总结
- 打印菱形图案
- 我管你什么okr还是kpi,PPT轻松交给你
- Future源码一观-JUC系列
- 基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
- Sequence list and linked list
- [GNN] hard core! This paper combs the classical graph network model
- Axure resources and prototype tool Axure RP 9 download
- STM32 key light
- Data storage - interview questions
猜你喜欢

MPLS experiment

Interview script of Software Test Engineer

机器学习基础:用 Lasso 做特征选择

1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)

Future源码一观-JUC系列
![[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!](/img/3f/75b3125f8779e6cf9467a30fd7eeb4.jpg)
[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!

Qtcharts notes (V) scatter diagram qscatterseries
![[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept](/img/b4/961b3b44e9ecbfd4bddd04318b663a.jpg)
[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept

我管你什么okr还是kpi,PPT轻松交给你

(Introduction to database system | Wang Shan) Chapter V database integrity: Exercises
随机推荐
Swagger2 quick start and use
Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience
Optimization of for loop
Software testers, how can you quickly improve your testing skills? Ten minutes to teach you
[dynamic programming] leetcode 53: maximum subarray sum
On the day when 28K joined Huawei testing post, I cried: everything I have done in these five months is worth it
Several ways to set up a blog locally [attach relevant software download links]
[error record] configure NDK header file path in Visual Studio
How to trade spot gold safely?
Anomalies seen during the interview
机器学习基础:用 Lasso 做特征选择
OS interrupt mechanism and interrupt handler
Leetcode 121 best time to buy and sell stock (simple)
功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
Severity code description the project file line prohibits the display of status error c4996 fopen ('fscanf ', StrCmp): this function or variable may be unsafe The most comprehensive solution
NLP Chinese corpus project: large scale Chinese natural language processing corpus
What insurance products should be bought for the elderly?
Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
P3371 [template] single source shortest path (weakened version)
Entropy and full connection layer