今天想练习一下简单的打印图形,小弟没有学过什么算法,嘿嘿,以后有更好的想法继续修改...

 static void InvertedTrainangle()
{
Console.WriteLine("请输入倒三角形的行数:");
int rows = int.Parse(Console.ReadLine());
//循环行数
for (int i = rows; i > ; i--)
{
//这个循环式控制对空格的输出 原理:空格数等于 从 0,1,2,...,rows-1 个
for (int z = ; z < rows - i; z++)
{
Console.Write(" ");
}
//这个循环控制 "*" 的输出,原理:个数=2*行-1
for (int j = ; j < * i - ; j++)
{
Console.Write("*");
}
Console.Write("\r\n");//换行
}
}

最新文章

  1. [原创]Matlab2016b打包为C++的lib文件
  2. MSDB数据库置疑的解决方法
  3. Linux之一条命令解决常见问题(持续更新)
  4. spark streaming kafka1.4.1中的低阶api createDirectStream使用总结
  5. Android进程守护
  6. 解决MySQL连接超时Communications link failure due to underlying exception
  7. odoo8 email
  8. Java同步工具类总结
  9. Do not wait until the conditions are perfect to begin. Beginning makes the conditions perfect(转)
  10. lxd-启动篇分析
  11. bash脚本基础
  12. 【Teradata】使用arcmain进行不落地数据迁移(管道)
  13. 解惑 [&quot;1&quot;, &quot;2&quot;, &quot;3&quot;].map(parseInt) 为何返回[1,NaN,NaN]
  14. Django----ModelFrom
  15. bs-loading
  16. scala 稀疏向量
  17. tomcat在conf/Catalina/localhost目录下配置项目路径
  18. mac activemq
  19. 三年半Java后端面试经历
  20. 扩展中国剩余定理 exCRT 学习笔记

热门文章

  1. web_custom_request应用示例
  2. .NET运用AJAX 总结及其实例
  3. Minitab中相关系数R-Sq和修正R-Sq(adj)的意思,计算公式和区别[转载]
  4. 关于最近Google无法正常访问的变通之法(已经被墙)
  5. git 学习笔记4--.gitignore
  6. discuz安装步骤
  7. c# 修饰词public, protected, private,internal,protected的区别
  8. uva-465(overflow)
  9. CF# Educational Codeforces Round 3 B. The Best Gift
  10. 使用递推解题:EOJ2999