U E D R , A S I H C RSS

Stack And Queue/손동일


~cpp 

#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];
    }


}

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:05
Processing time 0.0145 sec