Created
July 6, 2018 21:57
-
-
Save gunaytemur/966e648d9038188f66c31ea67044cc65 to your computer and use it in GitHub Desktop.
Data Structure C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yığın dizi uygulaması (Stack array implementation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#include"iostream"
using namespace std;
int dizi[5];
int top=-1;
void push(int x){
if(top==4)
cout<<"stack dolu";
else
{
//top++;
//dizi[top]=x;
dizi[++top]=x;
}
}
void hesapla(int x){
int y=10;
int top=x+y;
cout<<"hesapladi-sonuc:"<<top<<endl;
}
void pop(){
}
void yazdir(){
}
void main(){
push(3);
push(7);
push(8);
push(12);
push(15);
push(11);
yazdir();
system("pause");
pop();
pop();
yazdir();
pop();
pop();
pop();
cout<<endl;
system("pause");
}