User Story
Create two variables which stores username as a text and password as an number.
When both username and password are correct
DEBUG | You logged in successfully
When username is correct but password is incorrect
DEBUG | You entered a wrong password.
When username is incorrect but password is correct
DEBUG | You entered a wrong username.
Else
DEBUG | Your both username and password are wrong.
Code
String userName ='engin61';
Integer password = 7777;
if(userName=='engin61' && password ==1234){
System.debug('You logged in successfully');
}
else if(userName=='engin61' && password !=1234){
System.debug('You entered a wrong password');
}
else if(userName!='engin61' && password ==1234){
System.debug('You entered a wrong username');
}
else{
System.debug('Your username and password are incorrect');
}