Pages
HOME
C Programs
CPP Programs
Java Programs
Data Structure
Web Designing
GeeksforGeeks Solutions
HackerRank Solutions
Projects
HackerRank 30 Days of Code Solutions
HackerRank Algorithms Solutions
Books
Freshers Job
11/23/2015
Write A C++ Program To Print Half Pyramid Using *
*
**
***
****
*****
******
#include<iostream>
using namespace std;
int main()
{
//By-Ghanendra Yadav
int i,j,n;
cout<<"Enter the No Of Row\n";
cin>>n;
for(i=1; i<=n; i++)
{
for(j=1; j<i; j++)
{
cout<<"*";
}
cout<<"\n";
}
return 0;
}
Output:-
Share This Article With Your Friends
Tweet
Share
Share
Share
Whatsapp
Recommended Posts For You
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment