Print Floyd’s Triangle in C++

Print Floyd’s Triangle in C++

Print Floyd’s Triangle in C++

 

FLOYD’S TRIANGLE

#include <iostream>

using namespace std;

int main()

{

int n , a = 1;

cout << “Enter the number of rows of Floyd’s triangle to print :ย  “; cin >> n;

for ( int i = 1; i <= n; i++)

{

for (int jย = 1; j<= i; j++)

{

cout << a;

a++;

}

cout << endl ;

}

return 0;

}

 

OUTPUT : Enter the number of rows of Floyd’s triangle to print : 4

1

2 3

4 5 6

7 8 9 10

 


 

Topics Covered :

  • floyd’s triangle
  • floyed triangle program
  • simple triangle pattern printing program
  • ย pattern printing code
  • cpp programming
  • c++ tuturial

 

 


 

 


 

Thanks for reading this blog. Hope you get satisfied with the blog and definitely this blog must have valued your time and effort of reading.

Take a time to connect our other digital creations such as Instagram , Facebook and Youtube.

 

๐Ÿง‘โ€๐Ÿ’ป๐Ÿง‘โ€๐Ÿ’ปย Social Mediaย Linksย ofย Tech DCodeย :

๐Ÿ‘‰๐Ÿปย YouTube :ย https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A
๐Ÿ‘‰๐Ÿปย Instagram :ย https://www.instagram.com/thetechdcode/
๐Ÿ‘‰๐Ÿปย Facebook Page :ย https://www.facebook.com/thetechdcode
๐Ÿ‘‰๐Ÿปย Twitter :ย https://twitter.com/thetechdcode
๐Ÿ‘‰๐Ÿปย Telegram Channel :ย https://t.me/thetechdcode
๐Ÿ‘‰๐Ÿปย Tech DCode Linktree :ย https://linktr.ee/thetechdcode
๐Ÿ‘‰๐Ÿปย My Personal Handles :ย https://linktr.ee/virtualshivamin

๐Ÿง‘โ€๐Ÿ’ป๐Ÿง‘โ€๐Ÿ’ปย Social Media Linksย ofย SHIVAM SINGHย (OWNER) :

๐Ÿ‘‰๐Ÿปย Instagram :ย https://www.instagram.com/virtualshivamin/
๐Ÿ‘‰๐Ÿปย Facebook Page :ย https://www.facebook.com/virtualshivamin/
๐Ÿ‘‰๐Ÿปย Twitter :ย https://twitter.com/virtualshivamin/
๐Ÿ‘‰๐Ÿปย Personal Linktree :ย https://linktr.ee/virtualshivaminย 

Leave a Reply

Your email address will not be published. Required fields are marked *