Step 1 - learn how to format code
Code:
# include <iostream>
using namespace std;
int main()
{
int x;
x = 0;
do {
int password;
cout << "Enter Password";
cin >> password;
cin.ignore();
if (password == 100) {
cout << "Correct Password Entry";
} else {
cout << "Invalid Password /n";
}
} while (x == 0);
cin.get();
}
2. /n is not a newline, \n is. Besides, in C++, it's bettter to use endl;
3. cout<<"Enter Password";
Output without a newline may not be seen due to buffering. Calling cout.flush(); will ensure that your prompt will be seen.
4. You never change the value of x inside the loop, so it loops forever no matter what you do.