please help, c++ isnt changing variable value : i want the code to get out of the while loop when i input a number other than 66, i made it print the value of plz to see if th evalue was changing. it is not changing, it stays at 1 even though i typed plz=o;
please help

    
    #include <iostream>
    #include <cstdlib>
    #include <cmath>
    using namespace std;

    int main()
    {
      cout << "welcome to the random number generator, please enter a 
    number\n";
       int plz=1, d;
      d=1;
      while (plz>0)
        {
      d=d+1;
          int g;
          cin >> g;
          g= 666;
          if (g==666)
            int j;
          else
           plz=0;
          cout << plz << "\n";
    }
      srand (d);
      d= rand();
      cout << d << "\n";
    }

`