当前位置:网站首页>c语言打印心形
c语言打印心形
2022-06-11 08:37:00 【Jimmy_jimi】
目标:打印心形

分析:
先生成一个菱形,采用用线条分割图像的思想进一步处理。
结果产出:
#include <stdio.h>
#include <stdlib.h>
int main() {
for (int j = 1; j < 20; j++)
{
for (int i = 1; i < 20; i++)
{
if (i + j >= 11 && i + j <= 29 && (i + j) % 2 == 1 && i - j<11 && i - j>-11 && j > 6)
{
if (j < 10 && j+i<=19 && i - j >= 1) {
printf(" ");
}
else {
printf("*");
}
}
else
{
printf(" ");
}
}
printf("\n");
}
}
边栏推荐
- 深度学习入门之pytorch安装
- bat 批处理单独环境打包
- Cron expressions in scheduled tasks
- js 中 Map 和 Set 的用法及区别
- 木板ISO 5660-1 热量释放速率摸底测试
- SAP 物料主数据归档
- Entity class conversion cannot be reassigned
- (resolved) the tqdm progress bar in the Jupiter notebook does not update and display in one line, but scrolls down to output
- In place reversal of a LinkedList
- Matlab学习9-图像处理之非线性锐化滤波
猜你喜欢

Installation (detailed illustration) and use of SVN

torch. Var (), sample variance, parent variance

BFS on tree (tree breathing first search)

指定环境下安装Jupyter

(一)aac开篇-核心组件原理之Lifecycle、LiveData、ViewModel与源码分析技巧(转载)

Introduction to database system experiment report answer Experiment 6: advanced query of data table

uniapp 插件开发

剑指 Offer 10- II. 青蛙跳台阶问题

Codetop - sort odd ascending even descending linked list

mysql高级特性篇,可以多看看,应付面试
随机推荐
Cron expressions in scheduled tasks
B+ super tree helps you know the underlying structure of MySQL
Introduction to knowledge atlas -- yedda annotation
Multiple limit of the same field of SQL
Zookepper===>动物管理员系统
Implementation of CRF for named entity recognition
Not eligible for getting processed by all beanpostprocessors
驱动壳美国测试UL 2043 符合要求有哪些?
Pg/oracle database ASCII code to string custom function
Mongodb--- automatically delete expired data using TTL index
CodeTop - 排序奇升偶降链表
M1 芯片指南:M1、M1 Pro、M1 Max 和 M1 Ultra
Sword finger offer 10- ii Frog jumping on steps
Interprocess communication
Qiao lerna: lerna auxiliary tool
Don't want the project out of control? You need to use project management tools
ActiveMQ简单教程,适合初学者,学习笔记yyds
Sword finger offer 40 Minimum number of K
SAP 物料主数据归档
torch. unbind()