#include <iostream>
int main()
{
cout <<"Enter your username. ";
string username1;
cin >> username1;
cout <<"Enter your password. ";
string password;
cin >> password;
if (username1=hello)
cout <<" Your username is correct." << endl; // see if username is right
if (password=1235)
cout <<" your password is correct" << endl; // see if password is right
else
cout <<" Please enter the right password" << endl;
cout <<" You are logged in sucessfully" << endl;
}
Also on line 13 hello is undeclared and you probably meant == for comparison instead of = for assignment. I think you meant to surround hello and 1235 with quotes like this: "hello" and "1235"
#include <iostream>
#include <string>
usingnamespace std;int main()
{
cout <<"Enter your username. ";
string username1;
cin >> username1;
cout <<"Enter your password. ";
string password;
cin >> password;
if (username1=="hello")
cout <<" Your username is correct." << endl; // see if username is right
if (password=="1235")
cout <<" your password is correct" << endl; // see if password is right
else
cout <<" Please enter the right password" << endl;
cout <<" You are logged in sucessfully" << endl;
}