C++ Examples – C++ program to print half Pyramid patterns of numbers




cpp tutorials
cpp tutorials

C++ program to print half Pyramid of numbers

#include <iostream>
using namespace std;
int main()
{
  int i,j,rows;
  cout<<"Enter the number of rows: ";
  cin>>rows;
  for(i=1;i<=rows;++i)
    {
      for(j=1;j<=i;++j)
        {
          cout<<j<<" ";
        }
      cout<<"\n";
    }
  return 0;
}

/*

OUTPUT:
Enter the number of rows: 5
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

*/

Different ways of Putting the above question

  • C++ program to print patterns of numbers
  • program to print pyramid of numbers
  • C++ Program to print half pyramid as using numbers as shown in figure below
  • C++ Program To display the half pyramid of * stars numbers and character
  • C++ program to print patterns of numbers and stars
  • Program to print half Pyramid
  • C Programming: half Pyramid
  • A program to print the half pyramid
  • Program to print pyramid of stars * – C Programming Examples
  • C++ program to print half patterns of numbers and stars
  • C++ Tutorial – A Star half pyramid and String triangle using for loops
  • C++ Star Pyramid – C++ Forum
  • C++ program to print patterns, half pyramids of numbers and stars
  • C++ Programming: Reverse Star Pyramid
  • C++ Programming Source Code to Print Pyramid and Triangles
  • Program to print pyramid of stars
  • C++ Tutorial – A Star pyramid and String triangle using for loops
  • C++ Program to Print Star Pyramid Triangle, C++
  • C++ programs to print pyramid patterns
  • C++ Program to print star pattern pyramid
  • C++ Programming Code To Create Pyramid and Structure
  • Print pyramids and diamonds in C Language – C and C++

 

 


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com





1 Comment

Leave a Reply

Your email address will not be published.


*