Write a program print half pyramid number
#include<iostream>
using namespace std;
int main()
{
int i,j,row,k=1;
cout<<"enter the row: ";
cin>>row;
for(i=1; i<=row; i++)
{
for(j=1; j<=i; j++)
{
if(j<=i)
{
cout<<k;
k++;
}
else
cout<<" ";
}
cout<<"\n";
}
return 0;
}