标签:== col c语言 nbsp number ber define int 实现
#include <stdio.h> #define NUMBER 100 int push(int* a, int top, int data) { a[++top] = data; return top; } int pop(int* a, int top) { if (top == -1) { return -1; } printf("%d\n",a[top]); top--; return top; } int main() { int a[NUMBER]; int top = -1; top = push(a, top, 1); top = push(a, top, 3); top = push(a, top, 5); top = pop(a, top); top = pop(a, top); top = pop(a, top); return 0; }
标签:== col c语言 nbsp number ber define int 实现
原文地址:https://www.cnblogs.com/zgen1/p/14585250.html