------------------------------------------------------------------------------------------------------------------
Number Pyramid Try It🔻
------------------------------------------------------------------------------------------------------------------
Number Pyramid Try It🔻
------------------------------------------------------------------------------------------------------------------
#include<iostream>
#include<iostream>
using
namespace std;
int main()
{
int
i,j,n,num=1,space;
cout<<"Enter how many rows u
want\n";
cin>>n;
space=n-1;
for(i=1;i<=n;i++)
{
num=i;
for(j=1;j<=space;j++)
{
cout<<" ";
}
space--;
for(j=1;j<=i;j++)
{
cout<<num;
num++;
}
num--;
num--;
for(j=1;j<i;j++)
{
cout<<num;
num--;
}
cout<<"\n";
}
return 0;
}
------------------------------------------------------------------------------------------------------------------
OUTPUT Try It🔻
------------------------------------------------------------------------------------------------------------------
Enter how many rows u want
5
1
232
34543
4567654
567898765