C++ Programming Code Examples C++ > If Else and Switch Case Code Examples if-else Statement - check the password if-else Statement - check the password #include <iostream> using namespace std; int main() { char name; int password; cout << "Enter the name: "; cin >> name; cout << " Enter your password: "; cin >> password; if (name == 'GG') { if (password == 8899) { cout << "Login successful"; } else { cout << "Incorrect PASSWORD, Try again."; } } else { cout << " Incorrect Login Details, Try again."; } }