C++ number-guessing game (computer tries to guess user's chosen number)
Some things stand out here:


Don't use using namespace std 
Consider not using rand()
Prefer using \n over std::endl
return 0 can be dropped from main as it's optional
You really need better variable names. Names should explain what the variable is used for. If you pick better names your superfluous comments can be removed alltogether