풀스택 개발자 2020. 10. 4. 14:40
#include<iostream>
using namespace std;


void routine(int r)
{
	if (r < 1)
	{
		return;
	}
	routine(r - 1);
	cout << r << endl;
}
int main()
{
	int n = 0;
	cin >> n;
	routine(n);
}

 

보기 쉽게 표현한 stack

 

실제 stack 메모리