Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

StackAndQueue/손동일

From ZeroWiki
Revision as of 05:28, 7 February 2021 by imported>Unknown
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DeleteMe - StackAndQueue/손동일페이지이름고치기 했습니다 - 임인택 스택큐


#include <iostream>
using namespace std;
void show_menu();
int
 in();
void out();
int arr[1000];
int i,j;

void main()
{

        show_menu();

        int choice;
        cin >> choice;



		while(cin>>choice)
		{
			if (choice==1)
			{
				in();
				continue;
			}

			else if (choice==2)
				;



			else if (choice==3)
				out();

		}


}








void show_menu()
{
        cout << " 1 : 입력"<<"\t"<<" 2 : 빼기"<<"\t"<< " 3 : 보여주기"<<endl;
}


int in()
{
	cout << "숫자를 입력하세요.. "<< endl;
	int a;
	cin >> a;
	arr[i] = a;
	return i;
}


void out()
{
	int k;

    for (k=0; k<i+1; k++)
    {
		cout << arr[k];
    }


}

StackAndQueue 손동일