Pages

💡 Now You Can Get your Assignments Sollution here... .💡 100% plagiarism Free Service...💡 Responsibility, punctuality and on-time delivery... 💡 Furnishing you with experts... 💡 experienced in your subject 100% privacy... 💡 helping you with the highest efficiency , professionalism Affordable and budget-friendly costs that do not make a hole in your wallet

C++ Code for Pattren

#include<iostream>
using namespace std;
void main()
{
int n=1,c=4,l=1;
for(int i=1;i<=4;i++)
{
for(int j=1;j<=c;j++)
{
cout<<" ";
}
for(int k=1;k<=n;k++)
{
cout<<l<<" ";
l++;
}
cout<<endl;
c--;
n++;
}
}

Output:
    1
   2 3
  4 5 6
7 8 9 10

No comments: