//zadacha4 bool isProgression(stack<double> myStack) { double first; double next; double difference; if (myStack.length() <= 2) { return true; } myStack.pop(first); myStack.top(next); difference = first - next; while (myStack.length() >= 1) { if (difference != first - next) { return false; } myStack.pop(first); myStack.top(next); } return true; }