In this program, you'll learn to print full number pyramid.
#include<iostream>
using namespace std;
int main()
{
int i, j, s, count=0;
for(i=0;i<4;i++)
{
for(s=0;s<3-i;s++)
{
cout<<" ";
}
for(j=0;j<=i;j++)
{
count++;
cout<< count << " ";
}
cout<< "\n";
}
return 0;
}
1
2 3
4 5 6
7 8 9 10