Input and output terminal cannot be separated with current knowledge , thats why i am not get success in correction of code , i am droping my code in description

#include
using namespace std;
int main()
{
char ch;int a; int b;

do
{
	cin>>ch;
	if(ch=='x' || ch=='X')
	{
		return 0;
	}
	cin>>a;
	cin>>b;
	if(b<0 || b>100000000)
    {
	    return 0;
    }
	if(a<0 || a>100000000)
    {
	    return 0;
    }
	
	switch(ch)
	{
		case '+' :
		            cout<<a+b<<'\n';
		            break;
		case '-' :
		            cout<<a-b<<'\n';
		            break;
        case '*' :
		            cout<<a*b<<'\n';
		            break;
		case '/' :
		            cout<<a/b<<'\n';
		            break;
		case '%' :
		            cout<<a%b<<'\n';
		            break;
		
		default :
		        cout<<"Invalid operation. Try again.";
				break;

	}
}while(true);

}