Creating a Right Pointer Pattern of Star in C++

Creating a Right Pointer Pattern of Star in C++

Logic Used –> n– (to make it odd) –> n=(n/2)+1 –> j=i –> j=n-i

Creating a 2 in 4 Triangles Pattern in C++

Creating a 2 in 4 Triangles Pattern in C++

Logic Used –> n=n/4 –> j=n-i+1 –> j=2*i-1 –> j=i –> j=2*(n-i)+1 –> j=i –> j=n-i+1 –> j=2*i-1 –>j=n-i+1 –> j=i –> j=2*(n-i)+1

Creating a 3 in 1 Triangle Pattern in C++

Creating a 3 in 1 Triangle Pattern in C++

Logic Used –> j=i-1 –> j=2*(n-i)+1 –> j=2*i-1 –> j=2*(n-i)+1 –> int  k=i-1 –> j=i-1 –> j=2*(n-i)+1

Creating a White-Spaced Diamond Pattern in C++

Creating a White-Spaced Diamond Pattern in C++

Logic Used –> n=n/2 –> j=n-i+1 –> j=2*i-1 –> j=n-i+1 –> j=i –> j=2*(n-i)+1 –> j=i

Creating a Boomerang Pattern/Shape in C++

Creating a Boomerang Pattern/Shape in C++

Logic Used –> n=n/2 –> j=i-1 –> j=i –> j=n-i –> j=n-i+1

Creating a Reverse Scalene Triangle Pattern in C++

Creating a Reverse Scalene Triangle Pattern in C++

Logic Used –> j=n-i –> j=n-i+1

Creating a Scalene Triangle Pattern in C++

Creating a Scalene Triangle Pattern in C++

Logic Used –> j=i-1 –> j=i

Creating a Kite Shape Pattern in C++

Creating a Kite Shape Pattern in C++

Logic Used –> n=n/2+1 –> j=n-i –> j=2*i-1 –> j=i-1 –> j=2*(n-i)+1 –> j=n-i –> j=2*i-1

Creating a Upper-Lower Pointed Triangle in C++

Creating a Upper-Lower Pointed Triangle in C++

Logic Used –> n=n/2+1 –> j=i-1 –> j=2*(n-i)+1 –> j=n-i –> j=2*i-1

Creating a Diamond Pattern in C++

Creating a Diamond Pattern in C++

Logic Used –> j=2*(n-i)+1 –> j=i


1 2