Our Recommendation for You Search your Query, You can find easily. for example search by book name or course name or any other which is related to your education

Followers

how to make pyramid in c++

construct pyramid of x in c++
how to make pyramid in c++

construct pyramid of x in c++:- 

This is the source code to make pyramid from asterik using c++.....

#include<iostream>
#include<iomanip>
using namespace std;
main(){
       int u=1;
       int space;
       int i,x;
       cout<<"Enter the length of the pyramid:";
       cin>>x;
       while(u<=x)
       {
                  i=1;
                  cout<<setw(space);
                  while(i++<=u)
                  cout<<"X";
                  u=u+2;
                  space--;
                  cout<<endl;
                  }
       system("pause");         
       }
End

 And:

Our Recommend Post
  • Why c++ is a popular programming language
  • how to fill and display array using functions
  • C Programming books download
  • how to fill the array of five elements
  • How to Download and Install Turbo C++ Compiler
  • how to shut down your computer using c++