М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
LiliLaind
LiliLaind
09.10.2022 03:46 •  Информатика

Понятная и не понятная информация

👇
Открыть все ответы
Ответ:
dicsi1
dicsi1
09.10.2022

ответ:http://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ru

Объяснение:http://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ruhttp://planetoflife.ru

4,5(89 оценок)
Ответ:
12VikaSmirnova34
12VikaSmirnova34
09.10.2022

import java.util.Scanner;

public class Authenticator {

public static void main(String[] args) {

 String login;

 String password;

 Scanner scan = new Scanner(System.in);

 

 System.out.println("login:");

 login = scan.next();

 System.out.println("password:");

 password = scan.next();

 

 if(login.equals("user") && password.equals("qwerty")){

  System.out.println("Authentication completed");

 }else{

  System.out.println("Invalid login or password");

 }

 

 scan.close();

 

}

}

Объяснение:

Краткий алгоритм этой программы:Импортируем класс Scanner(для ввода текста);В методе main создаем две переменные типа String и одну типа Scanner;Вводим значения при а;Если логин и пароль верны,то выводим Authentication completed. Иначе выводим Invalid login or password;Закрываем Scanner;
4,7(30 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ