Try to print the following number pattern using C++.
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int i, j, k;
k = 1;
for(i=1; i<=5; i++)
{
for(j=5; j>=1; j--)
{
if(j > i)
cout << " ";
else
cout << setw(3) << k++;
}
cout << "\n";
}
return 0;
}