أتمنى ما يكون متكرر وهو :
نريد كتابة دالة تنسخ stack of integers إلى stack أخرى بحيث لا يمكن تعريف أي متغير في الدالة غير هذه المتغيرات وهي :
3 أعداد صحيحة (فقط)
مثال
stack1: 1 6 8 4 5 stack2: empty after the function that take the two stacks as a parameter (you can use in the function only three integers) stack1: 1 6 8 4 5 stack2: 1 6 8 4 5
ملاحظة : رأس الدالة pop بالشكل التالي:
int pop()