Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions program2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include<stack>
#include<conio.h>
using namespace std;

void check(stack <int>s)
{
/*
Expand All @@ -10,14 +11,14 @@ void check(stack <int>s)
s-integer object of stack
return value:none
approach:-if size of stack is odd
pop an element from stack
while stack is not empty
pop two elements from stach
check whether they are consecutive or not
if elements of atleast one pair is not consecutive
print FALSE
otherwise
print TRUE
pop an element from stack
while stack is not empty
pop two elements from stach
check whether they are consecutive or not
if elements of atleast one pair is not consecutive
print FALSE
otherwise
print TRUE
*/

int a,b,temp=1;
Expand Down Expand Up @@ -50,6 +51,7 @@ void check(stack <int>s)
cout<<"\tFALSE";
}
}

int main()
{
/*
Expand Down