Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Hello {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- StringBuilder a = new StringBuilder(sc.nextLine());
- StringBuilder b = new StringBuilder(sc.nextLine());
- int counter = 1;
- while (counter!=0)
- {
- if (a.toString().equals(b.reverse().toString())) {
- System.out.println("User logged in.");
- } else {
- System.out.println("Incorrect, try again");
- }
- }
- counter++;
- if (counter == 4) {
- System.out.println("user blocked" );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement