#include <iostream>
using namespace std;
int main()
{
 int num;
 cout<<"Enter number of rows: ";
 (cin>>num).get();
 for(int i=1;i<=num;i++)
 {
  for(int j=num-i;j>0;j--)
   cout<<".";
  for(int k=1;k<=i;k++)
   cout<<"*";
  cout<<endl;
 }
 system("pause");
 return 0;
}

编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习9的更多相关文章

  1. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习9

    #include <iostream> #include <fstream> #include <cstdlib> #include <string> ...

  2. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习8

    #include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using ...

  3. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习7

    #include <iostream> #include <string> #include <cctype> using namespace std; int m ...

  4. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6

    #include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...

  5. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习5

    #include <iostream> using namespace std; const double N1=35000; const int N2=15000; const int ...

  6. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习4

    #include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showm ...

  7. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3

    #include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter ...

  8. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习2

    #include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int mai ...

  9. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习1

    #include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=c ...

随机推荐

  1. 微信小程序之动态获取元素宽高

    我以前一直以为微信小程序不能动态获取view元素的宽高.但是自从看到: wx.createSelectorQuery() 这个api接口,以前的某些问题就能得到解决了... 那么,这个api接口怎么用 ...

  2. mysql快速生成批量测试数据

    mysql快速生成批量测试数据 参考资料: https://blog.csdn.net/oahz4699092zhao/article/details/53332148 -- 创建一个临时内存表 ; ...

  3. 浏览器UI多线程及JavaScript单线程运行机制的理解

    在上一篇博客中,我对jQuery的队列(queue)机制和动画(animate)机制做了一个深入的解析,在animate的实现机制其核心是依靠queue来完成的,其中在jQuery的链式调用部分,之前 ...

  4. git 重命名本地分支,并提交到远程

    1.重命名 git branch -m oldBranchName newBranchName 2.删除远程分支:git push origin :oldBranchName 3.将重命名过的分支提交 ...

  5. [物理学与PDEs]第1章第7节 媒质中的 Maxwell 方程组 7.3 媒质中电磁场量的表示

    1. 电磁能量密度 $$\bex \cfrac{1}{2}({\bf E}\cdot{\bf D}+{\bf B}\cdot{\bf H}). \eex$$ 2. 电磁能量流密度向量 $$\bex { ...

  6. 不二之选_iTOP-4418开发板研发之旅_缩短开发时间

    迅为iTOP-4418开发板拿到手?用能力印证梦想,培养你的研发路程,能力·思维 一.板载WIFI蓝牙.4G.GPS.千兆以太网接口.串口.重力加速度计等. 二.自选模块支持500W摄像头自动对焦摄像 ...

  7. 解决radio、select表单返回时,再次选择失效

    应用场景:我们在选择好radio跟select之后提交表单,返回历史记录时,再次选择,提交表单,发现提交的是上次表单选择的 解决办法:我们可以一进页面就给radio跟select的选项重置掉,因为,返 ...

  8. spring中用到哪些设计模式?

    设计模式作为工作学习中的枕边书,却时常处于勤说不用的尴尬境地,也不是我们时常忘记,只是一直没有记忆. Spring作为业界的经典框架,无论是在架构设计方面,还是在代码编写方面,都堪称行内典范.好了,话 ...

  9. JVM--01

    ---恢复内容开始--- jdk  jre  jvm 的关系 java7的结构图 java8 jvm内存溢出 jdk /bin 目录下的jconsole java发展历史 oak:用在嵌入式设备上 相 ...

  10. 关于简单的安卓APP状态栏设置(类似沉浸式状态栏)

    1.设置为全屏模式: 在所需设置为全屏模式的逻辑的onCreat()方法中加入以下代码即可: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.K ...