#include <iostream>

using namespace std;

int main()
{
   cout << "Enter x: \n";
   int x;
   cin >> x;
   cout << "Enter y: \n";
   int y;
   cin >> y;
  if ((x == 0 && y != 0) || (x != 0 && y == 0))
  {
      cout << "Exactly one of " << x << " and " << y << " is zero.";
  }
  else
  {
      cout << "Neither or both of " << x << " and " << y << " are zero.";
  }
   return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: