daily pastebin goal
68%
SHARE
TWEET

RaduZeu

a guest Mar 26th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. struct Cub
  7. {
  8.     int st[1001], top;
  9.     void Push(int x)
  10.     {
  11.         st[++top] = x;
  12.  
  13.     }
  14.     void Pop()
  15.     {
  16.         if( top >= 0)
  17.         {
  18.             top --;
  19.         }
  20.     }
  21.     int Top()
  22.     {
  23.         return st[top];
  24.     }
  25.     int Empty()
  26.     {
  27.         return (top < 0);
  28.     }
  29.     void Init()
  30.     {
  31.         top = -1;
  32.     }
  33.     int Size()
  34.     {
  35.         return top+1;
  36.     }
  37. };
  38.  
  39.  
  40.  
  41. Cub A;
  42.  
  43. int main()
  44. {
  45.    
  46.  
  47.  
  48.     return 0;
  49. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top