[ create a new paste ] login | about

Link: http://codepad.org/3WjzIkY7    [ raw code | output | fork ]

박정욱 - C++, pasted on Jun 4:
#include<iostream>
#include<string>
using namespace std;

enum RIGHT_OR_WORNG {RIGHT=-99,WRONG};

int input_expression();					//사용자로부터 수식 입력
int is_expression(string input);		//수식인지 아닌지를 판단

void main()
{
	int return_of;
	
	do{
	cout <<"수식을 입력하시오.(연산자,숫자, 미지수는 X만 사용) \n";
	return_of=input_expression();
	}while(return_of==WRONG);


}

int input_expression()
{
	string input;

	cin  >> input;

	switch (is_expression(input))
	{
		case RIGHT : return RIGHT;
		case WRONG : return WRONG;
	}

}

int is_expression(string input)
{


	cout << 

	return RIGHT;
}


Output:
1
2
Line 10: error: '::main' must return 'int'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: