MalikShahzaib.com
  • Interesting Stories
    • Interesting Stories

      Two patients story – happiness short story summary

      October 9, 2020

      Interesting Stories

      I love you – short story about family…

      September 20, 2020

      Interesting Stories

      true islamic stories – Hazrat Bilal رضي الله…

      September 20, 2020

  • Home
  • Education
    • Assembly language programming C++ Theory of Automata All
      Assembly language programming

      Solution of the first assignment of assembly language

      September 20, 2020

      C++

      c++ beginner guide

      October 27, 2020

      C++

      c++ program to print patterns of numbers

      October 5, 2020

      C++

      car parking project in c++ with source code

      October 3, 2020

      C++

      dev c++ game code tic tac toe source…

      September 24, 2020

      Theory of Automata

      Theory of Automata

      October 9, 2020

      Theory of Automata

      deterministic finite automata dfa examples

      October 9, 2020

      Theory of Automata

      DFA Design for all strings

      October 3, 2020

      Education

      c++ beginner guide

      October 27, 2020

      Education

      Theory of Automata

      October 9, 2020

      Education

      deterministic finite automata dfa examples

      October 9, 2020

      Education

      c++ program to print patterns of numbers

      October 5, 2020

  • Islamic knowledge
    • Islamic knowledge

      cave of Hira on Jabal e Noor history…

      October 27, 2020

      Islamic knowledge

      Muqam e Tazlil | The Place of the…

      October 27, 2020

      Islamic knowledge

      Masjid al-fajr | Masjid Bani Unaif Madinah| Masjid…

      October 27, 2020

      Islamic knowledge

      Masjid abu bakr madinah history

      October 27, 2020

      Islamic knowledge

      jannat ul baqi garden of heaven

      October 27, 2020

  • Technology
    • Technology

      how to delete web page from google search

      October 27, 2020

      Technology

      cannot download files from google drive

      October 12, 2020

      Technology

      Open chrome incognito default

      October 9, 2020

MalikShahzaib.com
  • Interesting Stories
    • Interesting Stories

      Two patients story – happiness short story summary

      October 9, 2020

      Interesting Stories

      I love you – short story about family…

      September 20, 2020

      Interesting Stories

      true islamic stories – Hazrat Bilal رضي الله…

      September 20, 2020

  • Home
  • Education
    • Assembly language programming C++ Theory of Automata All
      Assembly language programming

      Solution of the first assignment of assembly language

      September 20, 2020

      C++

      c++ beginner guide

      October 27, 2020

      C++

      c++ program to print patterns of numbers

      October 5, 2020

      C++

      car parking project in c++ with source code

      October 3, 2020

      C++

      dev c++ game code tic tac toe source…

      September 24, 2020

      Theory of Automata

      Theory of Automata

      October 9, 2020

      Theory of Automata

      deterministic finite automata dfa examples

      October 9, 2020

      Theory of Automata

      DFA Design for all strings

      October 3, 2020

      Education

      c++ beginner guide

      October 27, 2020

      Education

      Theory of Automata

      October 9, 2020

      Education

      deterministic finite automata dfa examples

      October 9, 2020

      Education

      c++ program to print patterns of numbers

      October 5, 2020

  • Islamic knowledge
    • Islamic knowledge

      cave of Hira on Jabal e Noor history…

      October 27, 2020

      Islamic knowledge

      Muqam e Tazlil | The Place of the…

      October 27, 2020

      Islamic knowledge

      Masjid al-fajr | Masjid Bani Unaif Madinah| Masjid…

      October 27, 2020

      Islamic knowledge

      Masjid abu bakr madinah history

      October 27, 2020

      Islamic knowledge

      jannat ul baqi garden of heaven

      October 27, 2020

  • Technology
    • Technology

      how to delete web page from google search

      October 27, 2020

      Technology

      cannot download files from google drive

      October 12, 2020

      Technology

      Open chrome incognito default

      October 9, 2020

c-program-to-print-patterns-of-numbers-585x360-min
C++Education

c++ program to print patterns of numbers

by Malik Shahzaib October 5, 2020 0 comment 326 views
In the tutorial we have learnt how to design c++ shapes patterns using nested loops. These are very basic and easy c++ observer pattern. Watch tutorial of c++ design patterns to learn the following code examples.
c-program-to-print-patterns-of-numbers

main()
{
for(int i=1;i<=5;i++)
{
for(int m=1;m<=5;m++)
{
cout<<“*”;
}
cout<<endl;
}
system(“pause”);
}

nested-loops-c-patterns

main()
{
for(int i=1;i<=5;i++)
{
for(int m=1;m<=i;m++)
{
cout<<“*”;
}
cout<<endl;
}
system(“pause”);
}

c-shapes

main()
{
for(int i=1;i<=5;i++)
{
for(int m=5;m>=i;m–)
{
cout<<“*”;
}
cout<<endl;
}
system(“pause”);
}

c-observer-pattern

main()
{
for(int i=1;i<=5;i++)
{
for(int m=1;m<=5;m++)
{
cout<<m;
}
cout<<endl;
}
system(“pause”);
}

observer-pattern-c

main()
{
for(int i=1;i<=5;i++)
{
for(int m=1;m<=i;m++)
{
cout<<m;
}
cout<<endl;
}
system(“pause”);
}

design-patterns-in-c

main()
{
for(int i=1;i<=5;i++)
{
for(int m=5;m>=i;m–)
{
cout<<m;
}
cout<<endl;
}
system(“pause”);
}

design-patterns-c

for(int i=1;i<=5;i++)
{
for(int m=1;m<=5;m++)
{
cout<<i;
}
cout<<endl;
}

c-shapes-1

for(int i=1;i<=5;i++)
{
for(int m=5;m>=1;m–)
{
cout<<m;
}
cout<<endl;
}

c-design-patterns

for(int i=5;i>=1;i–)
{
for(int m=5;m>=1;m–)
{
cout<<i;
}
cout<<endl;
}

c-design-pattern

 for(int i=1;i<=5;i++)
{
for(int m=1;m<=5;m++)
{
cout<<m;
}
cout<<endl;
}

0 comment
1
FacebookTwitterPinterestEmail
Malik Shahzaib

previous post
car parking project in c++ with source code
next post
Two patients story – happiness short story summary

You may also like

c++ beginner guide

October 27, 2020

Theory of Automata

October 9, 2020

deterministic finite automata dfa examples

October 9, 2020

car parking project in c++ with source code

October 3, 2020

DFA Design for all strings

October 3, 2020

dev c++ game code tic tac toe source...

September 24, 2020

Solution of the first assignment of assembly language

September 20, 2020

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

Categories

  • Assembly language programming
  • C++
  • Education
  • Interesting Stories
  • Islamic knowledge
  • Technology
  • Theory of Automata
  • Trendingnow
  • Uncategorized
  • unity error
  • unity game development

About Me

I'm MalikShahzaib. I'm youtuber, blogger and game developer professionally.

Archives

  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • Facebook
  • Instagram
  • Linkedin
  • Youtube
  • Email
  • Whatsapp

@2019 - All Right Reserved. Designed and Developed by MalikShahzaib Official

MalikShahzaib.com
  • Interesting Stories
    • Interesting Stories

      Two patients story – happiness short story summary

      October 9, 2020

      Interesting Stories

      I love you – short story about family…

      September 20, 2020

      Interesting Stories

      true islamic stories – Hazrat Bilal رضي الله…

      September 20, 2020

  • Home
  • Education
    • Assembly language programming C++ Theory of Automata All
      Assembly language programming

      Solution of the first assignment of assembly language

      September 20, 2020

      C++

      c++ beginner guide

      October 27, 2020

      C++

      c++ program to print patterns of numbers

      October 5, 2020

      C++

      car parking project in c++ with source code

      October 3, 2020

      C++

      dev c++ game code tic tac toe source…

      September 24, 2020

      Theory of Automata

      Theory of Automata

      October 9, 2020

      Theory of Automata

      deterministic finite automata dfa examples

      October 9, 2020

      Theory of Automata

      DFA Design for all strings

      October 3, 2020

      Education

      c++ beginner guide

      October 27, 2020

      Education

      Theory of Automata

      October 9, 2020

      Education

      deterministic finite automata dfa examples

      October 9, 2020

      Education

      c++ program to print patterns of numbers

      October 5, 2020

  • Islamic knowledge
    • Islamic knowledge

      cave of Hira on Jabal e Noor history…

      October 27, 2020

      Islamic knowledge

      Muqam e Tazlil | The Place of the…

      October 27, 2020

      Islamic knowledge

      Masjid al-fajr | Masjid Bani Unaif Madinah| Masjid…

      October 27, 2020

      Islamic knowledge

      Masjid abu bakr madinah history

      October 27, 2020

      Islamic knowledge

      jannat ul baqi garden of heaven

      October 27, 2020

  • Technology
    • Technology

      how to delete web page from google search

      October 27, 2020

      Technology

      cannot download files from google drive

      October 12, 2020

      Technology

      Open chrome incognito default

      October 9, 2020

@2019 - All Right Reserved. Designed and Developed by MalikShahzaib Official