C 练习实例10

C 语言教程 · 2019-02-21 14:27:45

题目:打印楼梯,同时在楼梯上方打印两个笑脸。

程序分析:用 ASCII 1 来输出笑脸;用i控制行,j来控制列,j根据i的变化来控制输出黑方格的个数。

如果出现乱码情况请参考【C 练习实例7】的解决方法。

实例

// Created by www.codercto.com on 15/11/9. // Copyright © 2015年 码农教程. All rights reserved. // #include<stdio.h> int main() { int i,j; printf("\1\1\n"); /*输出两个笑脸*/ for(i=1;i<11;i++) { for(j=1;j<=i;j++) printf("%c%c",219,219); printf("\n"); } return 0; }

以上实例输出结果为:

点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html

查看所有标签

Traction: A Startup Guide to Getting Customers

Traction: A Startup Guide to Getting Customers

Gabriel Weinberg、Justin Mares / S-curves Publishing / 2014-8-25 / USD 14.99

Most startups end in failure. Almost every failed startup has a product. What failed startups don't have is traction -- real customer growth. This book introduces startup founders and employees to......一起来看看 《Traction: A Startup Guide to Getting Customers》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

SHA 加密
SHA 加密

SHA 加密工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试