#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char user[20];
int senha, contador = 0;
do {
printf("Entre com o usuario: "); printf("Entre com a senha: "); // aqui as credenciais estão corretas
if (!strcmp(user
, "leonardo") && senha
== 123) { printf("\nAcesso concedido.\n"); break;
}
contador++;
} while (contador < 3);
if (contador == 3) {
printf("Limite de tentativas alcancadas.\n"); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKaW50IG1haW4oKSB7CiAgICBjaGFyIHVzZXJbMjBdOwogICAgaW50IHNlbmhhLCBjb250YWRvciA9IDA7CiAgICBkbyB7CiAgICAgICAgcHJpbnRmKCJFbnRyZSBjb20gbyB1c3VhcmlvOiAiKTsKICAgICAgICBzY2FuZigiJXMiLCB1c2VyKTsKICAgICAgICBwcmludGYoIkVudHJlIGNvbSBhIHNlbmhhOiAiKTsKICAgICAgICBzY2FuZigiJWQiLCAmc2VuaGEpOwogICAgICAgIC8vIGFxdWkgYXMgY3JlZGVuY2lhaXMgZXN0w6NvIGNvcnJldGFzCiAgICAgICAgaWYgKCFzdHJjbXAodXNlciwgImxlb25hcmRvIikgJiYgc2VuaGEgPT0gMTIzKSB7CiAgICAgICAgICAgIHByaW50ZigiXG5BY2Vzc28gY29uY2VkaWRvLlxuIik7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBjb250YWRvcisrOwogICAgfSB3aGlsZSAoY29udGFkb3IgPCAzKTsKICAgIGlmIChjb250YWRvciA9PSAzKSB7CiAgICAgICAgcHJpbnRmKCJMaW1pdGUgZGUgdGVudGF0aXZhcyBhbGNhbmNhZGFzLlxuIik7CiAgICB9CiAgICBwcmludGYoIkZpbS5cbiIpOwogICAgcmV0dXJuIDA7Cn0=