Simple pattern 6 in C++ language.
In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.
We are going to print below pattern:
In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.
We are going to print below pattern:
In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.
We are going to print below pattern:
1
1 2
2 3 4
4 5 6 7
7 8 9 10 11
11 12 13 14 15 16
In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.
We are going to print below pattern:
1
2 3
4 5 6
In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.
We are going to print below pattern:
1
2 1
3 2 1
solution:
In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.
We are going to print below pattern:
1
2 2
3 3 3
4 4 4 4
solution:
In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.
We are going to print below pattern:
Question: Write a program in c++ that take input from user and print following pattern till user input ?
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
solution:
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<j<<" ";
}
cout<<endl;
}
return 0;
}
If you want to learn c++ in depth then do visit: learn c++ in depth.