Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void push(int);
- void pop();
- int stack[5];
- int top=0;
- int main(void){
- push(10);
- push(20);
- push(30);
- push(40);
- push(50);
- push(60);
- push(70);
- for(int i = 0; i < 10; i++){
- cout << stack[i] << endl;
- }
- system("pause");
- return 0;
- }
- void push(int a){
- if(top < 5){
- stack[top++] = a;
- }
- }
- void pop(){
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement