import java.util.Scanner;
public class Main {
// WhileTasks
public static void main
(String[] args
) { Scanner scanner
= new Scanner
(System.
in); System.
out.
println("Buy an elephant!"); String userAnswer
= scanner.
nextLine(); int count = 1;
while(true) {
if(userAnswer.equals(rightAnswer)) {
if (count > 1) {
System.
out.
println("Vot tak bi srazu!"); }
System.
out.
println("Take care, its yours!"); break;
} else {
System.
out.
println("Everyone says: \"" + userAnswer
+ "\", but you have to buy an elephant!"); userAnswer = scanner.nextLine();
}
count++;
}
scanner.close();
}
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKcHVibGljIGNsYXNzIE1haW4gewoJLy8gV2hpbGVUYXNrcwoJCglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgewoJCVNjYW5uZXIgc2Nhbm5lciA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJU3lzdGVtLm91dC5wcmludGxuKCJCdXkgYW4gZWxlcGhhbnQhIik7CgkJU3RyaW5nIHVzZXJBbnN3ZXIgPSBzY2FubmVyLm5leHRMaW5lKCk7CgkJU3RyaW5nIHJpZ2h0QW5zd2VyID0gIk9rIjsKCQlpbnQgY291bnQgPSAxOwoJCQoJCXdoaWxlKHRydWUpIHsKCQlpZih1c2VyQW5zd2VyLmVxdWFscyhyaWdodEFuc3dlcikpIHsKCQkJaWYgKGNvdW50ID4gMSkgewoJCQkJU3lzdGVtLm91dC5wcmludGxuKCJWb3QgdGFrIGJpIHNyYXp1ISIpOwoJCQl9CgkJCVN5c3RlbS5vdXQucHJpbnRsbigiVGFrZSBjYXJlLCBpdHMgeW91cnMhIik7CgkJCWJyZWFrOwoJCQl9IGVsc2UgewoJCQlTeXN0ZW0ub3V0LnByaW50bG4oIkV2ZXJ5b25lIHNheXM6IFwiIiArIHVzZXJBbnN3ZXIgKyAiXCIsIGJ1dCB5b3UgaGF2ZSB0byBidXkgYW4gZWxlcGhhbnQhIik7CQoJCQl1c2VyQW5zd2VyID0gc2Nhbm5lci5uZXh0TGluZSgpOwoJCQl9CgkJCWNvdW50Kys7CgkJfQoJCQkKCQlzY2FubmVyLmNsb3NlKCk7CgkJCQoJfQp9