A test case has been failed

#include
#include<math.h>
using namespace std;
int main()
{
long long int n1,n2,c;
char ch;

cin>>ch;
while(ch!='x' && ch!='X')
{
    if(ch=='+')
    {
        cin>>n1>>n2;
        c=n1+n2;
        cout<<c<<endl;
    }
    else if(ch=='-')
    {
        cin>>n1>>n2;
        c=n1-n2;
        cout<<c<<endl;
    }
	else if(ch =='*')
    {
        cin>>n1>>n2;
        c=n1*n2;
        cout<<c<<endl;
    }
    else if(ch=='%' && n2!=0)
    {
        cin>>n1>>n2;
        c=n1%n2;
        cout<<c<<endl;
    }
    else if(ch=='/' && n2!=0)
    {
        cin>>n1>>n2;
        c=n1/n2;
        cout<<c<<endl;
    }
    else
         cout<<"Invalid operation. Try again."<<endl;
    cin>>ch;
}
return 0;

}

could you tell me where is the error

@bhogadi.sreeja19
dont add the check for n2 in case of % and / operator.
If it will be zero then the garbage value will be answer so just remove the check for n2=0.