Here is code in C++ to print the following 45 pairs of numbers:
11 21 22 31 32 33 41 42 43 44 51 ...
// include header
#include <bits/stdc++.h>
using namespace std;
//main function
int main() {
//declare variables
int count=0;
int flag=1;
// for loop to print the pattern
for(int i=1;;i++)
{
for(int j=1;j<=i;j++)
{
// this will print the pairs in vertical manner
cout<<i<<j<<endl;
//cout<<i<<j<<""; //this will print horizontally
// this will keep count to print only 45 pairs
count++;
// if count is equal to 45 then it will break the inner loop
if(count==45)
{
flag=0;
break;
}
}
// if the flag is eqaul to 45 then it will break the outer loop
if(flag==0)
break;
}
return 0;
}
Explanation:
First declare and initialize two variables "count=0" & "flag=1". Here variable
"count" is use to print only 45 pairs and "flag" is used to break the loop when 45 pairs of numbers are printed.In the nested for loop, for every value of i,j will run from 1 to i and print i then j without any space. After every pair, count will incremented by 1. It will check if "count" is greater than 45 or not. If "count" is greater than 45 then it make flag=0 and break the loop. in the outer for loop, if flag is 0 then it break the outer for loop.
Output:
11 21 22 31 32 33 41 42 43 44 51 52 53 54 55 61 62 63 64 65 66 71 72 73 74 75 76 77 81 82 83 84 85 86 87 88 91 92 93 94 95 96 97 98 99
Answer:
-Bayesian network
-Naive Bayes classifier where we use a tree with a single root
-Dependency network where cycles are allowed
-Tree-augmented classifier or TAN model
Explanation:
Answer:
Project teams do smaller portions of the entire project in small sprints.
Teams can interact to handle different steps simultaneously if needed.
Documentation is still required to keep everybody on track. This documentation allows teams to keep control over what version of the project they are working on and how the project has changed along the way.
As an approach to rapid development, the focus is on development rather than planning, enabling teams to start work more quickly.
hope this helps you
:)
Answer:
Push Z
Push Y
Pop Y
Push X
Pop X
Push W
Push V
Pop V
Push U
Pop U
Pop W
Pop Z
Push T
Push S
Pop S
Push R
Pop R
Pop T
Explanation:
A stack is a term in computer science that defines an abstract data type that acts as a collection of elements. It has two operations which are mainly push and pop.
Push is used in adding elements to the collection, while pop is used in removing elements from the collection.
If the element A has been pushed to the stack, you check if the top element in the pop[] sequence is A or not.
If it is A, you then pop it right, else top of the push[] sequence will be changed and make the sequences invalid.
So, similarly do the same for all the elements and check if the stack is empty or not in the last.
If empty you then print True else print False.